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

Unified 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, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_settings/mock_content_settings_provider.h
diff --git a/chrome/browser/content_settings/mock_content_settings_provider.h b/chrome/browser/content_settings/mock_content_settings_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..e7169095e743c78991c217c9de94f9395092a4e8
--- /dev/null
+++ b/chrome/browser/content_settings/mock_content_settings_provider.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2010 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_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_
+#define CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "chrome/browser/content_settings/content_settings_provider.h"
+
+class MockContentSettingsProvider : public ContentSettingsProviderInterface {
+ public:
+ // Create a content settings provider that provides a given setting for a
+ // given type.
+ MockContentSettingsProvider(ContentSettingsType content_type,
+ ContentSetting setting,
+ bool is_managed,
+ bool can_override);
+ virtual ~MockContentSettingsProvider();
+
+ // ContentSettingsProviderInterface implementation.
+ virtual bool CanProvideDefaultSetting(ContentSettingsType content_type);
+ virtual ContentSetting ProvideDefaultSetting(
+ ContentSettingsType content_type);
+ virtual void UpdateDefaultSetting(ContentSettingsType content_type,
+ ContentSetting setting);
+ virtual bool DefaultSettingIsManaged(ContentSettingsType content_type);
+
+ private:
+ ContentSettingsType content_type_;
+ ContentSetting setting_;
+ bool is_managed_;
+ bool can_override_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockContentSettingsProvider);
+};
+
+#endif // CHROME_BROWSER_CONTENT_SETTINGS_MOCK_CONTENT_SETTINGS_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698