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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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 PrefServiceSyncable;
10 class PrefServiceBase; 11 class PrefServiceBase;
11 12
12 // Helper class for getting, changing bookmark prompt related preferences. 13 // Helper class for getting, changing bookmark prompt related preferences.
13 class BookmarkPromptPrefs { 14 class BookmarkPromptPrefs {
14 public: 15 public:
15 // Constructs and associates to |prefs|. Further operations occurred on 16 // Constructs and associates to |prefs|. Further operations occurred on
16 // associated |prefs|. 17 // associated |prefs|.
17 explicit BookmarkPromptPrefs(PrefServiceBase* prefs); 18 explicit BookmarkPromptPrefs(PrefServiceBase* prefs);
18 ~BookmarkPromptPrefs(); 19 ~BookmarkPromptPrefs();
19 20
20 // Disables bookmark prompt feature. 21 // Disables bookmark prompt feature.
21 void DisableBookmarkPrompt(); 22 void DisableBookmarkPrompt();
22 23
23 // Returns number of times bookmark prompt displayed so far. 24 // Returns number of times bookmark prompt displayed so far.
24 int GetPromptImpressionCount() const; 25 int GetPromptImpressionCount() const;
25 26
26 // Increments bookmark prompt impression counter. 27 // Increments bookmark prompt impression counter.
27 void IncrementPromptImpressionCount(); 28 void IncrementPromptImpressionCount();
28 29
29 // Returns true if bookmark prompt feature enabled, otherwise false. 30 // Returns true if bookmark prompt feature enabled, otherwise false.
30 bool IsBookmarkPromptEnabled() const; 31 bool IsBookmarkPromptEnabled() const;
31 32
32 // Registers user preferences used by bookmark prompt feature. 33 // Registers user preferences used by bookmark prompt feature.
33 static void RegisterUserPrefs(PrefServiceBase* prefs); 34 static void RegisterUserPrefs(PrefServiceSyncable* prefs);
34 35
35 private: 36 private:
36 PrefServiceBase* prefs_; // Weak. 37 PrefServiceBase* prefs_; // Weak.
37 38
38 DISALLOW_COPY_AND_ASSIGN(BookmarkPromptPrefs); 39 DISALLOW_COPY_AND_ASSIGN(BookmarkPromptPrefs);
39 }; 40 };
40 41
41 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_PROMPT_PREFS_H_ 42 #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