blob: 884894f606bf6e53534bfbb73e8bd3d5e95b5140 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_PROMPT_PREFS_H_
#define CHROME_BROWSER_BOOKMARKS_BOOKMARK_PROMPT_PREFS_H_
#include "base/basictypes.h"
class PrefService;
namespace user_prefs {
class PrefRegistrySyncable;
}
// Helper class for getting, changing bookmark prompt related preferences.
class BookmarkPromptPrefs {
public:
// Constructs and associates to |prefs|. Further operations occurred on
// associated |prefs|.
explicit BookmarkPromptPrefs(PrefService* prefs);
~BookmarkPromptPrefs();
// Disables bookmark prompt feature.
void DisableBookmarkPrompt();
// Returns number of times bookmark prompt displayed so far.
int GetPromptImpressionCount() const;
// Increments bookmark prompt impression counter.
void IncrementPromptImpressionCount();
// Returns true if bookmark prompt feature enabled, otherwise false.
bool IsBookmarkPromptEnabled() const;
// Registers user preferences used by bookmark prompt feature.
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
private:
PrefService* prefs_; // Weak.
DISALLOW_COPY_AND_ASSIGN(BookmarkPromptPrefs);
};
#endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_PROMPT_PREFS_H_
|