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

Side by Side Diff: chrome/browser/content_settings/content_settings_extension_provider.cc

Issue 8539004: Replace SetContentSetting method of the content_settings::Provider interface with GetWebsiteSetting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto origin/trunk Created 9 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 unified diff | Download patch | Annotate | Revision Log
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 #include "chrome/browser/content_settings/content_settings_extension_provider.h" 5 #include "chrome/browser/content_settings/content_settings_extension_provider.h"
6 6
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "chrome/browser/content_settings/content_settings_utils.h" 8 #include "chrome/browser/content_settings/content_settings_utils.h"
9 #include "chrome/browser/extensions/extension_content_settings_store.h" 9 #include "chrome/browser/extensions/extension_content_settings_store.h"
10 #include "chrome/common/content_settings_pattern.h" 10 #include "chrome/common/content_settings_pattern.h"
(...skipping 13 matching lines...) Expand all
24 24
25 RuleIterator* ExtensionProvider::GetRuleIterator( 25 RuleIterator* ExtensionProvider::GetRuleIterator(
26 ContentSettingsType content_type, 26 ContentSettingsType content_type,
27 const ResourceIdentifier& resource_identifier, 27 const ResourceIdentifier& resource_identifier,
28 bool incognito) const { 28 bool incognito) const {
29 return extensions_settings_->GetRuleIterator(content_type, 29 return extensions_settings_->GetRuleIterator(content_type,
30 resource_identifier, 30 resource_identifier,
31 incognito); 31 incognito);
32 } 32 }
33 33
34 bool ExtensionProvider::SetWebsiteSetting(
35 const ContentSettingsPattern& primary_pattern,
36 const ContentSettingsPattern& secondary_pattern,
37 ContentSettingsType content_type,
38 const ResourceIdentifier& resource_identifier,
39 Value* value) {
40 return false;
41 }
42
34 void ExtensionProvider::ShutdownOnUIThread() { 43 void ExtensionProvider::ShutdownOnUIThread() {
35 RemoveAllObservers(); 44 RemoveAllObservers();
36 extensions_settings_->RemoveObserver(this); 45 extensions_settings_->RemoveObserver(this);
37 } 46 }
38 47
39 void ExtensionProvider::OnContentSettingChanged( 48 void ExtensionProvider::OnContentSettingChanged(
40 const std::string& extension_id, 49 const std::string& extension_id,
41 bool incognito) { 50 bool incognito) {
42 if (incognito_ != incognito) 51 if (incognito_ != incognito)
43 return; 52 return;
44 // TODO(markusheintz): Be more concise. 53 // TODO(markusheintz): Be more concise.
45 NotifyObservers(ContentSettingsPattern(), 54 NotifyObservers(ContentSettingsPattern(),
46 ContentSettingsPattern(), 55 ContentSettingsPattern(),
47 CONTENT_SETTINGS_TYPE_DEFAULT, 56 CONTENT_SETTINGS_TYPE_DEFAULT,
48 std::string()); 57 std::string());
49 } 58 }
50 59
51 } // namespace content_settings 60 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698