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

Side by Side Diff: chrome/browser/prefs/browser_ui_prefs_migrator.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PREFS_BROWSER_UI_PREFS_MIGRATOR_H_
6 #define CHROME_BROWSER_PREFS_BROWSER_UI_PREFS_MIGRATOR_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/prefs/pref_store.h"
10 #include "base/prefs/writeable_pref_store.h"
11
12 // When prefs are loaded from disk this class migrates some previously
13 // dynamically registered preferences to their new home in a statically
14 // registered dictionary. It can't follow the usual migration pattern because
15 // it is migrating preferences that aren't registered at migration time and has
16 // to iterate over a raw DictionaryValue looking for keys to migrate.
17 //
18 // Objects of this class delete themselves after the migration.
19 //
20 // TODO(dgrogan): Delete this for m41. See http://crbug.com/167256.
21
22 class BrowserUIPrefsMigrator : public PrefStore::Observer {
23 public:
24 explicit BrowserUIPrefsMigrator(WriteablePrefStore* pref_store);
25
26 // Overrides from PrefStore::Observer.
27 virtual void OnPrefValueChanged(const std::string& key) OVERRIDE {}
28 virtual void OnInitializationCompleted(bool succeeded) OVERRIDE;
29
30 private:
31 friend struct base::DefaultDeleter<BrowserUIPrefsMigrator>;
32
33 virtual ~BrowserUIPrefsMigrator();
34
35 WriteablePrefStore* pref_store_;
36
37 DISALLOW_COPY_AND_ASSIGN(BrowserUIPrefsMigrator);
38 };
39
40 #endif // CHROME_BROWSER_PREFS_BROWSER_UI_PREFS_MIGRATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | chrome/browser/prefs/browser_ui_prefs_migrator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698