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

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

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 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_PROMPT_PREFS_H_ 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_PROMPT_PREFS_H_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_PROMPT_PREFS_H_ 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_PROMPT_PREFS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 class PrefService;
11
12 namespace user_prefs {
10 class PrefRegistrySyncable; 13 class PrefRegistrySyncable;
11 class PrefService; 14 }
12 15
13 // Helper class for getting, changing bookmark prompt related preferences. 16 // Helper class for getting, changing bookmark prompt related preferences.
14 class BookmarkPromptPrefs { 17 class BookmarkPromptPrefs {
15 public: 18 public:
16 // Constructs and associates to |prefs|. Further operations occurred on 19 // Constructs and associates to |prefs|. Further operations occurred on
17 // associated |prefs|. 20 // associated |prefs|.
18 explicit BookmarkPromptPrefs(PrefService* prefs); 21 explicit BookmarkPromptPrefs(PrefService* prefs);
19 ~BookmarkPromptPrefs(); 22 ~BookmarkPromptPrefs();
20 23
21 // Disables bookmark prompt feature. 24 // Disables bookmark prompt feature.
22 void DisableBookmarkPrompt(); 25 void DisableBookmarkPrompt();
23 26
24 // Returns number of times bookmark prompt displayed so far. 27 // Returns number of times bookmark prompt displayed so far.
25 int GetPromptImpressionCount() const; 28 int GetPromptImpressionCount() const;
26 29
27 // Increments bookmark prompt impression counter. 30 // Increments bookmark prompt impression counter.
28 void IncrementPromptImpressionCount(); 31 void IncrementPromptImpressionCount();
29 32
30 // Returns true if bookmark prompt feature enabled, otherwise false. 33 // Returns true if bookmark prompt feature enabled, otherwise false.
31 bool IsBookmarkPromptEnabled() const; 34 bool IsBookmarkPromptEnabled() const;
32 35
33 // Registers user preferences used by bookmark prompt feature. 36 // Registers user preferences used by bookmark prompt feature.
34 static void RegisterUserPrefs(PrefRegistrySyncable* registry); 37 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry);
35 38
36 private: 39 private:
37 PrefService* prefs_; // Weak. 40 PrefService* prefs_; // Weak.
38 41
39 DISALLOW_COPY_AND_ASSIGN(BookmarkPromptPrefs); 42 DISALLOW_COPY_AND_ASSIGN(BookmarkPromptPrefs);
40 }; 43 };
41 44
42 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_PROMPT_PREFS_H_ 45 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_PROMPT_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model_factory.cc ('k') | chrome/browser/bookmarks/bookmark_prompt_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698