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

Side by Side Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 962
963 base::StringValue type_string( 963 base::StringValue type_string(
964 ContentSettingsTypeToGroupName(CONTENT_SETTINGS_TYPE_MEDIASTREAM)); 964 ContentSettingsTypeToGroupName(CONTENT_SETTINGS_TYPE_MEDIASTREAM));
965 web_ui()->CallJavascriptFunction("ContentSettings.setExceptions", 965 web_ui()->CallJavascriptFunction("ContentSettings.setExceptions",
966 type_string, media_exceptions); 966 type_string, media_exceptions);
967 967
968 UpdateSettingDefaultFromModel(CONTENT_SETTINGS_TYPE_MEDIASTREAM); 968 UpdateSettingDefaultFromModel(CONTENT_SETTINGS_TYPE_MEDIASTREAM);
969 } 969 }
970 970
971 void ContentSettingsHandler::UpdateMIDISysExExceptionsView() { 971 void ContentSettingsHandler::UpdateMIDISysExExceptionsView() {
972 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebMIDI)) { 972 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
973 switches::kEnableWebMIDI)) {
973 web_ui()->CallJavascriptFunction( 974 web_ui()->CallJavascriptFunction(
974 "ContentSettings.showExperimentalWebMIDISettings", 975 "ContentSettings.showExperimentalWebMIDISettings",
975 base::FundamentalValue(true)); 976 base::FundamentalValue(true));
976 } 977 }
977 978
978 UpdateSettingDefaultFromModel(CONTENT_SETTINGS_TYPE_MIDI_SYSEX); 979 UpdateSettingDefaultFromModel(CONTENT_SETTINGS_TYPE_MIDI_SYSEX);
979 UpdateExceptionsViewFromHostContentSettingsMap( 980 UpdateExceptionsViewFromHostContentSettingsMap(
980 CONTENT_SETTINGS_TYPE_MIDI_SYSEX); 981 CONTENT_SETTINGS_TYPE_MIDI_SYSEX);
981 } 982 }
982 983
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 1525
1525 // Exceptions apply only when the feature is enabled. 1526 // Exceptions apply only when the feature is enabled.
1526 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); 1527 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui()));
1527 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); 1528 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM);
1528 web_ui()->CallJavascriptFunction( 1529 web_ui()->CallJavascriptFunction(
1529 "ContentSettings.enableProtectedContentExceptions", 1530 "ContentSettings.enableProtectedContentExceptions",
1530 base::FundamentalValue(enable_exceptions)); 1531 base::FundamentalValue(enable_exceptions));
1531 } 1532 }
1532 1533
1533 } // namespace options 1534 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698