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

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

Issue 1767423002: [Do not commit] Track revocations in content_settings::Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_supervised_provider.h " 5 #include "chrome/browser/content_settings/content_settings_supervised_provider.h "
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 bool old_value = !value_map_.IsContentSettingEnabled(entry.content_type); 76 bool old_value = !value_map_.IsContentSettingEnabled(entry.content_type);
77 if (new_value != old_value) { 77 if (new_value != old_value) {
78 to_notify.push_back(entry.content_type); 78 to_notify.push_back(entry.content_type);
79 value_map_.SetContentSettingDisabled(entry.content_type, new_value); 79 value_map_.SetContentSettingDisabled(entry.content_type, new_value);
80 } 80 }
81 } 81 }
82 } 82 }
83 for (const auto& notification : to_notify) { 83 for (const auto& notification : to_notify) {
84 NotifyObservers(ContentSettingsPattern(), ContentSettingsPattern(), 84 NotifyObservers(ContentSettingsPattern(), ContentSettingsPattern(),
85 notification, std::string()); 85 notification, CONTENT_SETTING_DEFAULT, std::string());
86 } 86 }
87 } 87 }
88 88
89 // Since the SupervisedProvider is a read only content settings provider, all 89 // Since the SupervisedProvider is a read only content settings provider, all
90 // methods of the ProviderInterface that set or delete any settings do nothing. 90 // methods of the ProviderInterface that set or delete any settings do nothing.
91 bool SupervisedProvider::SetWebsiteSetting( 91 bool SupervisedProvider::SetWebsiteSetting(
92 const ContentSettingsPattern& primary_pattern, 92 const ContentSettingsPattern& primary_pattern,
93 const ContentSettingsPattern& secondary_pattern, 93 const ContentSettingsPattern& secondary_pattern,
94 ContentSettingsType content_type, 94 ContentSettingsType content_type,
95 const ResourceIdentifier& resource_identifier, 95 const ResourceIdentifier& resource_identifier,
96 base::Value* value) { 96 base::Value* value) {
97 return false; 97 return false;
98 } 98 }
99 99
100 void SupervisedProvider::ClearAllContentSettingsRules( 100 void SupervisedProvider::ClearAllContentSettingsRules(
101 ContentSettingsType content_type) { 101 ContentSettingsType content_type) {
102 } 102 }
103 103
104 void SupervisedProvider::ShutdownOnUIThread() { 104 void SupervisedProvider::ShutdownOnUIThread() {
105 DCHECK(CalledOnValidThread()); 105 DCHECK(CalledOnValidThread());
106 RemoveAllObservers(); 106 RemoveAllObservers();
107 user_settings_subscription_.reset(); 107 user_settings_subscription_.reset();
108 } 108 }
109 109
110 } // namespace content_settings 110 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698