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

Side by Side Diff: components/content_settings/core/browser/content_settings_provider.h

Issue 596613002: Remove content dependencies from content settings providers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: shutdown fix 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 COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_PROVIDER_H_ 7 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_PROVIDER_H_
8 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_PROVIDER_H_ 8 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_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 13
14 #include "base/threading/non_thread_safe.h"
14 #include "base/values.h" 15 #include "base/values.h"
15 #include "components/content_settings/core/common/content_settings_types.h" 16 #include "components/content_settings/core/common/content_settings_types.h"
16 17
17 class ContentSettingsPattern; 18 class ContentSettingsPattern;
18 19
19 namespace content_settings { 20 namespace content_settings {
20 21
21 struct Rule; 22 struct Rule;
22 class RuleIterator; 23 class RuleIterator;
23 24
24 typedef std::string ResourceIdentifier; 25 typedef std::string ResourceIdentifier;
25 26
26 class ProviderInterface { 27 class ProviderInterface : public base::NonThreadSafe {
Bernhard Bauer 2014/09/23 10:08:19 This class is supposed to be an empty interface, a
Jun Mukai 2014/09/23 20:48:45 Removed
27 public: 28 public:
28 virtual ~ProviderInterface() {} 29 virtual ~ProviderInterface() {}
29 30
30 // Returns a |RuleIterator| over the content setting rules stored by this 31 // Returns a |RuleIterator| over the content setting rules stored by this
31 // provider. If |incognito| is true, the iterator returns only the content 32 // provider. If |incognito| is true, the iterator returns only the content
32 // settings which are applicable to the incognito mode and differ from the 33 // settings which are applicable to the incognito mode and differ from the
33 // normal mode. Otherwise, it returns the content settings for the normal 34 // normal mode. Otherwise, it returns the content settings for the normal
34 // mode. The caller takes the ownership of the returned |RuleIterator|. It is 35 // mode. The caller takes the ownership of the returned |RuleIterator|. It is
35 // not allowed to call other |ProviderInterface| functions (including 36 // not allowed to call other |ProviderInterface| functions (including
36 // |GetRuleIterator|) for the same provider until the |RuleIterator| is 37 // |GetRuleIterator|) for the same provider until the |RuleIterator| is
(...skipping 29 matching lines...) Expand all
66 // Detaches the Provider from all Profile-related objects like PrefService. 67 // Detaches the Provider from all Profile-related objects like PrefService.
67 // This methods needs to be called before destroying the Profile. 68 // This methods needs to be called before destroying the Profile.
68 // Afterwards, none of the methods above that should only be called on the UI 69 // Afterwards, none of the methods above that should only be called on the UI
69 // thread should be called anymore. 70 // thread should be called anymore.
70 virtual void ShutdownOnUIThread() = 0; 71 virtual void ShutdownOnUIThread() = 0;
71 }; 72 };
72 73
73 } // namespace content_settings 74 } // namespace content_settings
74 75
75 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_PROVIDER_H_ 76 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698