Add a do_not_sync pref to ExtensionPrefs.

Split from https://codereview.chromium.org/308003005/ for extensions
system changes that allows to install a none syncable Extension.

- Add a do_not_sync pref to ExtensionPrefs;
- Add a kInstallFlagDoNotSync that CrxInstaller uses to initialize the pref;
- Update util::ShouldSyncApp and add ShouldSyncExtension to use the pref to skip sync in ExtensionSyncService;

BUG=358791

Review URL: https://codereview.chromium.org/323843003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277269 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index f3fbae3..d9a5370a3 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -582,8 +582,11 @@
   if (extension && extension->was_installed_by_oem())
     creation_flags |= Extension::WAS_INSTALLED_BY_OEM;
 
-  if (extension)
+  if (extension) {
     installer->set_is_ephemeral(extension_prefs_->IsEphemeralApp(id));
+    installer->set_install_flag(extensions::kInstallFlagDoNotSync,
+                                extension_prefs_->DoNotSync(id));
+  }
 
   installer->set_creation_flags(creation_flags);