Adding the creation_flags back to pending_extension_info.
Add a unit test to cover the case when an external extension
is updated before being installed and make sure it retains
the creation flags.

BUG=627522

Review-Url: https://codereview.chromium.org/2146963004
Cr-Commit-Position: refs/heads/master@{#405856}
diff --git a/chrome/browser/extensions/pending_extension_manager.cc b/chrome/browser/extensions/pending_extension_manager.cc
index 601bc3a..9014cc9 100644
--- a/chrome/browser/extensions/pending_extension_manager.cc
+++ b/chrome/browser/extensions/pending_extension_manager.cc
@@ -120,6 +120,7 @@
                           should_allow_install,
                           kIsFromSync,
                           kSyncLocation,
+                          Extension::NO_FLAGS,
                           kMarkAcknowledged,
                           remote_install);
 }
@@ -149,6 +150,7 @@
                           should_allow_install,
                           kIsFromSync,
                           kManifestLocation,
+                          Extension::NO_FLAGS,
                           kMarkAcknowledged,
                           kRemoteInstall);
 }
@@ -189,6 +191,7 @@
                           &AlwaysInstall,
                           kIsFromSync,
                           location,
+                          creation_flags,
                           mark_acknowledged,
                           kRemoteInstall);
 }
@@ -215,6 +218,7 @@
                           &AlwaysInstall,
                           kIsFromSync,
                           install_source,
+                          creation_flags,
                           mark_acknowledged,
                           kRemoteInstall);
 }
@@ -248,6 +252,7 @@
     PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install,
     bool is_from_sync,
     Manifest::Location install_source,
+    int creation_flags,
     bool mark_acknowledged,
     bool remote_install) {
   CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -259,6 +264,7 @@
                             should_allow_install,
                             is_from_sync,
                             install_source,
+                            creation_flags,
                             mark_acknowledged,
                             remote_install);