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

Side by Side Diff: chrome/browser/ui/webui/options2/content_settings_handler2.cc

Issue 10381064: Remove the gyp flag for registerProtocolHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
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/options2/content_settings_handler2.h" 5 #include "chrome/browser/ui/webui/options2/content_settings_handler2.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 } else { 434 } else {
435 default_setting = 435 default_setting =
436 profile->GetHostContentSettingsMap()-> 436 profile->GetHostContentSettingsMap()->
437 GetDefaultContentSetting(type, provider_id); 437 GetDefaultContentSetting(type, provider_id);
438 } 438 }
439 439
440 return ContentSettingToString(default_setting); 440 return ContentSettingToString(default_setting);
441 } 441 }
442 442
443 void ContentSettingsHandler::UpdateHandlersEnabledRadios() { 443 void ContentSettingsHandler::UpdateHandlersEnabledRadios() {
444 #if defined(ENABLE_REGISTER_PROTOCOL_HANDLER)
445 base::FundamentalValue handlers_enabled( 444 base::FundamentalValue handlers_enabled(
446 GetProtocolHandlerRegistry()->enabled()); 445 GetProtocolHandlerRegistry()->enabled());
447 446
448 web_ui()->CallJavascriptFunction( 447 web_ui()->CallJavascriptFunction(
449 "ContentSettings.updateHandlersEnabledRadios", 448 "ContentSettings.updateHandlersEnabledRadios",
450 handlers_enabled); 449 handlers_enabled);
451 #endif // defined(ENABLE_REGISTER_PROTOCOL_HANDLER)
452 } 450 }
453 451
454 void ContentSettingsHandler::UpdateAllExceptionsViewsFromModel() { 452 void ContentSettingsHandler::UpdateAllExceptionsViewsFromModel() {
455 for (int type = CONTENT_SETTINGS_TYPE_DEFAULT + 1; 453 for (int type = CONTENT_SETTINGS_TYPE_DEFAULT + 1;
456 type < CONTENT_SETTINGS_NUM_TYPES; ++type) { 454 type < CONTENT_SETTINGS_NUM_TYPES; ++type) {
457 // The content settings type CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE 455 // The content settings type CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE
458 // is supposed to be set by policy only. Hence there is no user facing UI 456 // is supposed to be set by policy only. Hence there is no user facing UI
459 // for this content type and we skip it here. 457 // for this content type and we skip it here.
460 if (type == CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE) 458 if (type == CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE)
461 continue; 459 continue;
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 941
944 HostContentSettingsMap* 942 HostContentSettingsMap*
945 ContentSettingsHandler::GetOTRContentSettingsMap() { 943 ContentSettingsHandler::GetOTRContentSettingsMap() {
946 Profile* profile = Profile::FromWebUI(web_ui()); 944 Profile* profile = Profile::FromWebUI(web_ui());
947 if (profile->HasOffTheRecordProfile()) 945 if (profile->HasOffTheRecordProfile())
948 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); 946 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap();
949 return NULL; 947 return NULL;
950 } 948 }
951 949
952 } // namespace options2 950 } // namespace options2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698