Code: void ExtensionServiceBackend::LoadSingleExtension(const FilePath& path_in) {
  CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));

  FilePath extension_path = path_in;
  file_util::AbsolutePath(&extension_path);

  int flags = Extension::ShouldAlwaysAllowFileAccess(Extension::LOAD) ?
      Extension::ALLOW_FILE_ACCESS : Extension::NO_FLAGS;
  if (Extension::ShouldDoStrictErrorChecking(Extension::LOAD))
    flags |= Extension::STRICT_ERROR_CHECKS;
  std::string error;
  scoped_refptr<const Extension> extension(extension_file_util::LoadExtension(
      extension_path,
      Extension::LOAD,
      flags,
      &error));

  if (!extension) {
    if (!BrowserThread::PostTask(
            BrowserThread::UI, FROM_HERE,
            NewRunnableMethod(
                this,
                &ExtensionServiceBackend::ReportExtensionLoadError,
                extension_path, error)))
      NOTREACHED() << error;
    return;
  }

  if (!BrowserThread::PostTask(
           BrowserThread::UI, FROM_HERE,
           NewRunnableMethod(
               this,
              &ExtensionServiceBackend::OnExtensionInstalled,
               extension)))
     NOTREACHED();
 }

Commit Message: Unrevert: Show the install dialog for the initial load of an unpacked extension
with plugins.

First landing broke some browser tests.

BUG=83273
TEST=in the extensions managmenet page, with developer mode enabled, Load an unpacked extension on an extension with NPAPI plugins. You should get an install dialog.
TBR=mihaip

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87738 0039d316-1c4b-4281-b951-d872f2087c98
CWE ID: CWE-20
void ExtensionServiceBackend::LoadSingleExtension(const FilePath& path_in) {
  CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));

  FilePath extension_path = path_in;
  file_util::AbsolutePath(&extension_path);

  int flags = Extension::ShouldAlwaysAllowFileAccess(Extension::LOAD) ?
      Extension::ALLOW_FILE_ACCESS : Extension::NO_FLAGS;
  if (Extension::ShouldDoStrictErrorChecking(Extension::LOAD))
    flags |= Extension::STRICT_ERROR_CHECKS;
  std::string error;
  scoped_refptr<const Extension> extension(extension_file_util::LoadExtension(
      extension_path,
      Extension::LOAD,
      flags,
      &error));

  if (!extension) {
    if (!BrowserThread::PostTask(
            BrowserThread::UI, FROM_HERE,
            NewRunnableMethod(
                this,
                &ExtensionServiceBackend::ReportExtensionLoadError,
                extension_path, error)))
      NOTREACHED() << error;
    return;
  }

  if (!BrowserThread::PostTask(
           BrowserThread::UI, FROM_HERE,
           NewRunnableMethod(
               this,
              &ExtensionServiceBackend::OnLoadSingleExtension,
               extension)))
     NOTREACHED();
 }
