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

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

Issue 545413002: Detach the dependency from host_content_settings_map to extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ProviderType Created 6 years, 3 months 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Interface for objects providing content setting rules. 5 // Interface for objects providing content setting rules.
6 6
7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ 7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ 8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
9 9
10 #define NO_RESOURCE_IDENTIFIER std::string() 10 #define NO_RESOURCE_IDENTIFIER std::string()
11 11
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "components/content_settings/core/common/content_settings.h"
16 #include "components/content_settings/core/common/content_settings_types.h" 17 #include "components/content_settings/core/common/content_settings_types.h"
17 18
18 class ContentSettingsPattern; 19 class ContentSettingsPattern;
19 20
20 namespace content_settings { 21 namespace content_settings {
21 22
22 struct Rule; 23 struct Rule;
23 class RuleIterator; 24 class RuleIterator;
24 25
25 typedef std::string ResourceIdentifier; 26 typedef std::string ResourceIdentifier;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // This should only be called on the UI thread, and not after 63 // This should only be called on the UI thread, and not after
63 // ShutdownOnUIThread has been called. 64 // ShutdownOnUIThread has been called.
64 virtual void ClearAllContentSettingsRules( 65 virtual void ClearAllContentSettingsRules(
65 ContentSettingsType content_type) = 0; 66 ContentSettingsType content_type) = 0;
66 67
67 // Detaches the Provider from all Profile-related objects like PrefService. 68 // Detaches the Provider from all Profile-related objects like PrefService.
68 // This methods needs to be called before destroying the Profile. 69 // This methods needs to be called before destroying the Profile.
69 // Afterwards, none of the methods above that should only be called on the UI 70 // Afterwards, none of the methods above that should only be called on the UI
70 // thread should be called anymore. 71 // thread should be called anymore.
71 virtual void ShutdownOnUIThread() = 0; 72 virtual void ShutdownOnUIThread() = 0;
73
74 // Returns the name of the provider.
75 virtual std::string GetProviderName() const = 0;
76
77 // Returns the SettingSource of the provider.
78 virtual content_settings::SettingSource GetSettingSource() const = 0;
72 }; 79 };
73 80
74 } // namespace content_settings 81 } // namespace content_settings
75 82
76 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ 83 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698