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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 IDS_PEPPER_FLASH_CAMERAMIC_TAB_LABEL); | 453 IDS_PEPPER_FLASH_CAMERAMIC_TAB_LABEL); |
454 RegisterTitle(localized_strings, "media-stream", | 454 RegisterTitle(localized_strings, "media-stream", |
455 IDS_MEDIA_STREAM_TAB_LABEL); | 455 IDS_MEDIA_STREAM_TAB_LABEL); |
456 RegisterTitle(localized_strings, "ppapi-broker", | 456 RegisterTitle(localized_strings, "ppapi-broker", |
457 IDS_PPAPI_BROKER_TAB_LABEL); | 457 IDS_PPAPI_BROKER_TAB_LABEL); |
458 | 458 |
459 Profile* profile = Profile::FromWebUI(web_ui()); | 459 Profile* profile = Profile::FromWebUI(web_ui()); |
460 localized_strings->SetBoolean( | 460 localized_strings->SetBoolean( |
461 "enable_web_intents", | 461 "enable_web_intents", |
462 web_intents::IsWebIntentsEnabledForProfile(profile)); | 462 web_intents::IsWebIntentsEnabledForProfile(profile)); |
| 463 |
| 464 localized_strings->SetBoolean("newContentSettings", |
| 465 CommandLine::ForCurrentProcess()->HasSwitch(switches::kContentSettings2)); |
463 } | 466 } |
464 | 467 |
465 void ContentSettingsHandler::InitializeHandler() { | 468 void ContentSettingsHandler::InitializeHandler() { |
466 notification_registrar_.Add( | 469 notification_registrar_.Add( |
467 this, chrome::NOTIFICATION_PROFILE_CREATED, | 470 this, chrome::NOTIFICATION_PROFILE_CREATED, |
468 content::NotificationService::AllSources()); | 471 content::NotificationService::AllSources()); |
469 notification_registrar_.Add( | 472 notification_registrar_.Add( |
470 this, chrome::NOTIFICATION_PROFILE_DESTROYED, | 473 this, chrome::NOTIFICATION_PROFILE_DESTROYED, |
471 content::NotificationService::AllSources()); | 474 content::NotificationService::AllSources()); |
472 | 475 |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1315 for (size_t i = 0; i < arraysize(kExContentSettingsTypeGroupNames); ++i) { | 1318 for (size_t i = 0; i < arraysize(kExContentSettingsTypeGroupNames); ++i) { |
1316 if (type == kExContentSettingsTypeGroupNames[i].type) | 1319 if (type == kExContentSettingsTypeGroupNames[i].type) |
1317 return kExContentSettingsTypeGroupNames[i].name; | 1320 return kExContentSettingsTypeGroupNames[i].name; |
1318 } | 1321 } |
1319 | 1322 |
1320 NOTREACHED(); | 1323 NOTREACHED(); |
1321 return std::string(); | 1324 return std::string(); |
1322 } | 1325 } |
1323 | 1326 |
1324 } // namespace options | 1327 } // namespace options |
OLD | NEW |