Code: SyncType GetSyncType(const Extension* extension) {
  if (!IsSyncable(extension)) {
    return SYNC_TYPE_NONE;
  }

  if (!ManifestURL::GetUpdateURL(extension).is_empty() &&
      !ManifestURL::UpdatesFromGallery(extension)) {
    return SYNC_TYPE_NONE;
  }

  if (PluginInfo::HasPlugins(extension))
     return SYNC_TYPE_NONE;
 
   switch (extension->GetType()) {
     case Manifest::TYPE_EXTENSION:
      return SYNC_TYPE_EXTENSION;

    case Manifest::TYPE_USER_SCRIPT:
      if (ManifestURL::UpdatesFromGallery(extension))
        return SYNC_TYPE_EXTENSION;
      return SYNC_TYPE_NONE;

    case Manifest::TYPE_HOSTED_APP:
    case Manifest::TYPE_LEGACY_PACKAGED_APP:
    case Manifest::TYPE_PLATFORM_APP:
      return SYNC_TYPE_APP;

    case Manifest::TYPE_UNKNOWN:
    case Manifest::TYPE_THEME:
    case Manifest::TYPE_SHARED_MODULE:
      return SYNC_TYPE_NONE;
  }
  NOTREACHED();
  return SYNC_TYPE_NONE;
}

Vulnerability Type: 
CWE ID: 
Summary: common/extensions/sync_helper.cc in Google Chrome before 28.0.1500.71 proceeds with sync operations for NPAPI extensions without checking for a certain plugin permission setting, which might allow remote attackers to trigger unwanted extension changes via unspecified vectors.
Commit Message: Fix syncing of NPAPI plugins.

This fix adds a check for |plugin| permission
while syncing NPAPI plugins.

BUG=252034

Review URL: https://chromiumcodereview.appspot.com/16816024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207830 0039d316-1c4b-4281-b951-d872f2087c98