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

Side by Side Diff: chrome/browser/content_settings/mock_content_settings_provider.h

Issue 5269007: Introduce a content settings provider interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/content_settings
Patch Set: updates Created 10 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
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "chrome/browser/content_settings/content_settings_provider.h"
11
12 class MockContentSettingsProvider : public ContentSettingsProviderInterface {
13 public:
14 // Create a content settings provider that provides a given setting for a
15 // given type.
16 MockContentSettingsProvider(ContentSettingsType content_type,
17 ContentSetting setting,
18 bool is_managed,
19 bool can_override);
20 virtual ~MockContentSettingsProvider();
21
22 // ContentSettingsProviderInterface implementation.
23 virtual bool CanProvideDefaultSetting(ContentSettingsType content_type);
24 virtual ContentSetting ProvideDefaultSetting(
25 ContentSettingsType content_type);
26 virtual void UpdateDefaultSetting(ContentSettingsType content_type,
27 ContentSetting setting);
28 virtual bool DefaultSettingIsManaged(ContentSettingsType content_type);
29
30 private:
31 ContentSettingsType content_type_;
32 ContentSetting setting_;
33 bool is_managed_;
34 bool can_override_;
35
36 DISALLOW_COPY_AND_ASSIGN(MockContentSettingsProvider);
37 };
38
39 #endif // CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698