Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / browser_ui_prefs.cc
index 447861e..a6b3491 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "base/prefs/pref_registry_simple.h"
 #include "base/prefs/pref_service.h"
+#include "base/prefs/scoped_user_pref_update.h"
 #include "chrome/browser/first_run/first_run.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/common/pref_names.h"
@@ -126,7 +127,11 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
       prefs::kBrowserWindowPlacementPopup,
       user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
   registry->RegisterDictionaryPref(
-      prefs::kPreferencesWindowPlacement,
+      prefs::kAppWindowPlacement,
+      user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+  registry->RegisterBooleanPref(
+      prefs::kImportAutofillFormData,
+      true,
       user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
   registry->RegisterBooleanPref(
       prefs::kImportBookmarks,
@@ -141,11 +146,11 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
       true,
       user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
   registry->RegisterBooleanPref(
-      prefs::kImportSearchEngine,
+      prefs::kImportSavedPasswords,
       true,
       user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
   registry->RegisterBooleanPref(
-      prefs::kImportSavedPasswords,
+      prefs::kImportSearchEngine,
       true,
       user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
   registry->RegisterBooleanPref(
@@ -187,24 +192,4 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
 #endif
 }
 
-void RegisterAppPrefs(const std::string& app_name, Profile* profile) {
-  // We need to register the window position pref.
-  //
-  // TODO(mnissler): Use a separate pref name pointing to a single
-  // dictionary instead. Also tracked as http://crbug.com/167256
-  std::string window_pref(prefs::kBrowserWindowPlacement);
-  window_pref.append("_");
-  window_pref.append(app_name);
-  PrefService* prefs = profile->GetPrefs();
-  if (!prefs->FindPreference(window_pref.c_str())) {
-    // TODO(joi): Do all registration up front.
-    scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
-        static_cast<user_prefs::PrefRegistrySyncable*>(
-            prefs->DeprecatedGetPrefRegistry()));
-    registry->RegisterDictionaryPref(
-        window_pref.c_str(), user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
-  }
-}
-
-
 }  // namespace chrome