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

Side by Side Diff: chrome/browser/bookmarks/bookmark_prompt_prefs.cc

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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/bookmarks/bookmark_prompt_prefs.h" 5 #include "chrome/browser/bookmarks/bookmark_prompt_prefs.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/common/pref_names.h" 8 #include "chrome/common/pref_names.h"
9 #include "components/user_prefs/pref_registry_syncable.h" 9 #include "components/user_prefs/pref_registry_syncable.h"
10 10
(...skipping 15 matching lines...) Expand all
26 void BookmarkPromptPrefs::IncrementPromptImpressionCount() { 26 void BookmarkPromptPrefs::IncrementPromptImpressionCount() {
27 prefs_->SetInteger(prefs::kBookmarkPromptImpressionCount, 27 prefs_->SetInteger(prefs::kBookmarkPromptImpressionCount,
28 GetPromptImpressionCount() + 1); 28 GetPromptImpressionCount() + 1);
29 } 29 }
30 30
31 bool BookmarkPromptPrefs::IsBookmarkPromptEnabled() const { 31 bool BookmarkPromptPrefs::IsBookmarkPromptEnabled() const {
32 return prefs_->GetBoolean(prefs::kBookmarkPromptEnabled); 32 return prefs_->GetBoolean(prefs::kBookmarkPromptEnabled);
33 } 33 }
34 34
35 // static 35 // static
36 void BookmarkPromptPrefs::RegisterUserPrefs( 36 void BookmarkPromptPrefs::RegisterProfilePrefs(
37 user_prefs::PrefRegistrySyncable* registry) { 37 user_prefs::PrefRegistrySyncable* registry) {
38 // We always register preferences without checking FieldTrial, because 38 // We always register preferences without checking FieldTrial, because
39 // we may not receive field trial list from the server yet. 39 // we may not receive field trial list from the server yet.
40 registry->RegisterBooleanPref( 40 registry->RegisterBooleanPref(
41 prefs::kBookmarkPromptEnabled, 41 prefs::kBookmarkPromptEnabled,
42 true, 42 true,
43 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 43 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
44 registry->RegisterIntegerPref( 44 registry->RegisterIntegerPref(
45 prefs::kBookmarkPromptImpressionCount, 45 prefs::kBookmarkPromptImpressionCount,
46 0, 46 0,
47 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 47 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
48 } 48 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_prompt_prefs.h ('k') | chrome/browser/bookmarks/bookmark_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698