OLD | NEW |
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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 IDS_MEDIA_STREAM_TAB_LABEL); | 453 IDS_MEDIA_STREAM_TAB_LABEL); |
454 RegisterTitle(localized_strings, "ppapi-broker", | 454 RegisterTitle(localized_strings, "ppapi-broker", |
455 IDS_PPAPI_BROKER_TAB_LABEL); | 455 IDS_PPAPI_BROKER_TAB_LABEL); |
456 RegisterTitle(localized_strings, "multiple-automatic-downloads", | 456 RegisterTitle(localized_strings, "multiple-automatic-downloads", |
457 IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL); | 457 IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL); |
458 RegisterTitle(localized_strings, "midi-sysex", | 458 RegisterTitle(localized_strings, "midi-sysex", |
459 IDS_MIDI_SYSEX_TAB_LABEL); | 459 IDS_MIDI_SYSEX_TAB_LABEL); |
460 RegisterTitle(localized_strings, "zoomlevels", | 460 RegisterTitle(localized_strings, "zoomlevels", |
461 IDS_ZOOMLEVELS_HEADER_AND_TAB_LABEL); | 461 IDS_ZOOMLEVELS_HEADER_AND_TAB_LABEL); |
462 | 462 |
463 localized_strings->SetString( | 463 localized_strings->SetString("exceptionsLearnMoreUrl", |
464 "exceptionsLearnMoreUrl", | 464 kExceptionsLearnMoreUrl); |
465 google_util::StringAppendGoogleLocaleParam( | |
466 kExceptionsLearnMoreUrl)); | |
467 } | 465 } |
468 | 466 |
469 void ContentSettingsHandler::InitializeHandler() { | 467 void ContentSettingsHandler::InitializeHandler() { |
470 notification_registrar_.Add( | 468 notification_registrar_.Add( |
471 this, chrome::NOTIFICATION_PROFILE_CREATED, | 469 this, chrome::NOTIFICATION_PROFILE_CREATED, |
472 content::NotificationService::AllSources()); | 470 content::NotificationService::AllSources()); |
473 notification_registrar_.Add( | 471 notification_registrar_.Add( |
474 this, chrome::NOTIFICATION_PROFILE_DESTROYED, | 472 this, chrome::NOTIFICATION_PROFILE_DESTROYED, |
475 content::NotificationService::AllSources()); | 473 content::NotificationService::AllSources()); |
476 | 474 |
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1565 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { | 1563 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { |
1566 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); | 1564 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); |
1567 // Exceptions apply only when the feature is enabled. | 1565 // Exceptions apply only when the feature is enabled. |
1568 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1566 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
1569 web_ui()->CallJavascriptFunction( | 1567 web_ui()->CallJavascriptFunction( |
1570 "ContentSettings.enableProtectedContentExceptions", | 1568 "ContentSettings.enableProtectedContentExceptions", |
1571 base::FundamentalValue(enable_exceptions)); | 1569 base::FundamentalValue(enable_exceptions)); |
1572 } | 1570 } |
1573 | 1571 |
1574 } // namespace options | 1572 } // namespace options |
OLD | NEW |