Index: components/content_settings/core/browser/stub_content_settings_client.h |
diff --git a/components/content_settings/core/browser/stub_content_settings_client.h b/components/content_settings/core/browser/stub_content_settings_client.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..346636f43107e4ab0d31c8db0802bd7f0784f4cc |
--- /dev/null |
+++ b/components/content_settings/core/browser/stub_content_settings_client.h |
@@ -0,0 +1,59 @@ |
+// Copyright (c) 2014 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 COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_STUB_CONTENT_SETTINGS_CLIENT_H_ |
+#define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_STUB_CONTENT_SETTINGS_CLIENT_H_ |
+ |
+#include "components/content_settings/core/browser/content_settings_client.h" |
+#include "components/content_settings/core/browser/stub_local_shared_objects_counter.h" |
+ |
+namespace content_settings { |
+ |
+// For test code only, to avoid the need to stub unneeded pure virtual methods |
+// of ContentSettingsClient. |
+class StubContentSettingsClient : public ContentSettingsClient { |
+ public: |
+ StubContentSettingsClient(); |
+ virtual ~StubContentSettingsClient(); |
+ |
+ // Stubbed methods of ContentSettingsClient. |
+ virtual void OnCookiesRead(const GURL& url, |
+ const GURL& first_party_url, |
+ const net::CookieList& cookie_list, |
+ bool blocked_by_policy) override; |
+ |
+ virtual void OnCookieChanged(const GURL& url, |
+ const GURL& first_party_url, |
+ const std::string& cookie_line, |
+ const net::CookieOptions& options, |
+ bool blocked_by_policy) override; |
+ |
+ virtual void OnFileSystemAccessed(const GURL& url, |
+ bool blocked_by_policy) override; |
+ |
+ virtual void OnIndexedDBAccessed(const GURL& url, |
+ const base::string16& description, |
+ bool blocked_by_policy) override; |
+ |
+ virtual void OnLocalStorageAccessed(const GURL& url, |
+ bool local, |
+ bool blocked_by_policy) override; |
+ |
+ virtual void OnWebDatabaseAccessed(const GURL& url, |
+ const base::string16& name, |
+ const base::string16& display_name, |
+ bool blocked_by_policy) override; |
+ |
+ virtual const LocalSharedObjectsCounter& local_shared_objects( |
+ AccessType type) const override; |
+ |
+ private: |
+ StubLocalSharedObjectsCounter counter_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(StubContentSettingsClient); |
+}; |
+ |
+} // namespace content_settings |
+ |
+#endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_STUB_CONTENT_SETTINGS_CLIENT_H_ |