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

Side by Side Diff: chrome/browser/ui/webui/options/content_settings_handler.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/options/content_settings_handler.h" 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled(); 783 ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled();
784 web_ui()->CallJavascriptFunction("ContentSettings.setExclusiveAccessVisible", 784 web_ui()->CallJavascriptFunction("ContentSettings.setExclusiveAccessVisible",
785 base::FundamentalValue(hide_settings), 785 base::FundamentalValue(hide_settings),
786 base::FundamentalValue(!hide_settings)); 786 base::FundamentalValue(!hide_settings));
787 } 787 }
788 788
789 void ContentSettingsHandler::OnContentSettingChanged( 789 void ContentSettingsHandler::OnContentSettingChanged(
790 const ContentSettingsPattern& primary_pattern, 790 const ContentSettingsPattern& primary_pattern,
791 const ContentSettingsPattern& secondary_pattern, 791 const ContentSettingsPattern& secondary_pattern,
792 ContentSettingsType content_type, 792 ContentSettingsType content_type,
793 ContentSetting previous_value,
793 std::string resource_identifier) { 794 std::string resource_identifier) {
794 const ContentSettingsDetails details( 795 const ContentSettingsDetails details(
795 primary_pattern, secondary_pattern, content_type, resource_identifier); 796 primary_pattern, secondary_pattern, content_type, resource_identifier);
796 // TODO(estade): we pretend update_all() is always true. 797 // TODO(estade): we pretend update_all() is always true.
797 if (details.update_all_types()) { 798 if (details.update_all_types()) {
798 UpdateAllExceptionsViewsFromModel(); 799 UpdateAllExceptionsViewsFromModel();
799 UpdateAllChooserExceptionsViewsFromModel(); 800 UpdateAllChooserExceptionsViewsFromModel();
800 } else { 801 } else {
801 if (ContainsKey(GetExceptionsInfoMap(), details.type())) 802 if (ContainsKey(GetExceptionsInfoMap(), details.type()))
802 UpdateExceptionsViewFromModel(details.type()); 803 UpdateExceptionsViewFromModel(details.type());
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 1852
1852 // Exceptions apply only when the feature is enabled. 1853 // Exceptions apply only when the feature is enabled.
1853 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); 1854 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui()));
1854 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); 1855 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM);
1855 web_ui()->CallJavascriptFunction( 1856 web_ui()->CallJavascriptFunction(
1856 "ContentSettings.enableProtectedContentExceptions", 1857 "ContentSettings.enableProtectedContentExceptions",
1857 base::FundamentalValue(enable_exceptions)); 1858 base::FundamentalValue(enable_exceptions));
1858 } 1859 }
1859 1860
1860 } // namespace options 1861 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698