Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2736)

Unified Diff: chrome/browser/ui/browser_ui_prefs.cc

Issue 511393003: No longer register app window placement preference keys on the fly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update to ToT Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_ui_prefs.h ('k') | chrome/browser/ui/browser_window_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_ui_prefs.cc
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
index 958e05e96accb79eb00d72b0c12352f0c8c7adbf..a6b34913b457f351590475002657904a5927cc02 100644
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -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"
@@ -125,6 +126,9 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterDictionaryPref(
prefs::kBrowserWindowPlacementPopup,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterDictionaryPref(
+ prefs::kAppWindowPlacement,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterBooleanPref(
prefs::kImportAutofillFormData,
true,
@@ -188,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
« no previous file with comments | « chrome/browser/ui/browser_ui_prefs.h ('k') | chrome/browser/ui/browser_window_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698