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

Side by Side Diff: chrome/browser/ui/ash/chrome_launcher_prefs.cc

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 7 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" 5 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 24 matching lines...) Expand all
35 const char kPinnedAppsPrefAppIDPath[] = "id"; 35 const char kPinnedAppsPrefAppIDPath[] = "id";
36 36
37 const char kShelfAutoHideBehaviorAlways[] = "Always"; 37 const char kShelfAutoHideBehaviorAlways[] = "Always";
38 const char kShelfAutoHideBehaviorNever[] = "Never"; 38 const char kShelfAutoHideBehaviorNever[] = "Never";
39 39
40 extern const char kShelfAlignmentBottom[] = "Bottom"; 40 extern const char kShelfAlignmentBottom[] = "Bottom";
41 extern const char kShelfAlignmentLeft[] = "Left"; 41 extern const char kShelfAlignmentLeft[] = "Left";
42 extern const char kShelfAlignmentRight[] = "Right"; 42 extern const char kShelfAlignmentRight[] = "Right";
43 extern const char kShelfAlignmentTop[] = "Top"; 43 extern const char kShelfAlignmentTop[] = "Top";
44 44
45 void RegisterChromeLauncherUserPrefs(PrefRegistrySyncable* registry) { 45 void RegisterChromeLauncherUserPrefs(
46 user_prefs::PrefRegistrySyncable* registry) {
46 // TODO: If we want to support multiple profiles this will likely need to be 47 // TODO: If we want to support multiple profiles this will likely need to be
47 // pushed to local state and we'll need to track profile per item. 48 // pushed to local state and we'll need to track profile per item.
48 registry->RegisterListPref(prefs::kPinnedLauncherApps, 49 registry->RegisterListPref(prefs::kPinnedLauncherApps,
49 CreateDefaultPinnedAppsList(), 50 CreateDefaultPinnedAppsList(),
50 PrefRegistrySyncable::SYNCABLE_PREF); 51 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
51 registry->RegisterStringPref(prefs::kShelfAutoHideBehavior, 52 registry->RegisterStringPref(prefs::kShelfAutoHideBehavior,
52 kShelfAutoHideBehaviorNever, 53 kShelfAutoHideBehaviorNever,
53 PrefRegistrySyncable::SYNCABLE_PREF); 54 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
54 registry->RegisterStringPref(prefs::kShelfAutoHideBehaviorLocal, 55 registry->RegisterStringPref(
55 std::string(), 56 prefs::kShelfAutoHideBehaviorLocal,
56 PrefRegistrySyncable::UNSYNCABLE_PREF); 57 std::string(),
58 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
57 registry->RegisterStringPref(prefs::kShelfAlignment, 59 registry->RegisterStringPref(prefs::kShelfAlignment,
58 kShelfAlignmentBottom, 60 kShelfAlignmentBottom,
59 PrefRegistrySyncable::SYNCABLE_PREF); 61 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
60 registry->RegisterStringPref(prefs::kShelfAlignmentLocal, 62 registry->RegisterStringPref(
61 std::string(), 63 prefs::kShelfAlignmentLocal,
62 PrefRegistrySyncable::UNSYNCABLE_PREF); 64 std::string(),
63 registry->RegisterBooleanPref(prefs::kShowLogoutButtonInTray, 65 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
64 false, 66 registry->RegisterBooleanPref(
65 PrefRegistrySyncable::UNSYNCABLE_PREF); 67 prefs::kShowLogoutButtonInTray,
66 registry->RegisterDictionaryPref(prefs::kShelfPreferences, 68 false,
67 PrefRegistrySyncable::UNSYNCABLE_PREF); 69 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
70 registry->RegisterDictionaryPref(
71 prefs::kShelfPreferences,
72 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
68 } 73 }
69 74
70 base::DictionaryValue* CreateAppDict(const std::string& app_id) { 75 base::DictionaryValue* CreateAppDict(const std::string& app_id) {
71 scoped_ptr<base::DictionaryValue> app_value(new base::DictionaryValue); 76 scoped_ptr<base::DictionaryValue> app_value(new base::DictionaryValue);
72 app_value->SetString(kPinnedAppsPrefAppIDPath, app_id); 77 app_value->SetString(kPinnedAppsPrefAppIDPath, app_id);
73 return app_value.release(); 78 return app_value.release();
74 } 79 }
75 80
76 } // namespace ash 81 } // namespace ash
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_launcher_prefs.h ('k') | chrome/browser/ui/autofill/autofill_dialog_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698