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/core_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/core_options_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 return; | 572 return; |
573 } | 573 } |
574 break; | 574 break; |
575 case TYPE_URL: { | 575 case TYPE_URL: { |
576 std::string original; | 576 std::string original; |
577 if (!value->GetAsString(&original)) { | 577 if (!value->GetAsString(&original)) { |
578 NOTREACHED(); | 578 NOTREACHED(); |
579 return; | 579 return; |
580 } | 580 } |
581 GURL fixed = url_formatter::FixupURL(original, std::string()); | 581 GURL fixed = url_formatter::FixupURL(original, std::string()); |
582 temp_value.reset(new base::StringValue(fixed.spec())); | 582 temp_value.reset(new base::Value(fixed.spec())); |
583 value = temp_value.get(); | 583 value = temp_value.get(); |
584 break; | 584 break; |
585 } | 585 } |
586 case TYPE_LIST: { | 586 case TYPE_LIST: { |
587 // In case we have a List pref we got a JSON string. | 587 // In case we have a List pref we got a JSON string. |
588 std::string json_string; | 588 std::string json_string; |
589 if (!value->GetAsString(&json_string)) { | 589 if (!value->GetAsString(&json_string)) { |
590 NOTREACHED(); | 590 NOTREACHED(); |
591 return; | 591 return; |
592 } | 592 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 plugin_status_pref_setter_.IsPepperFlashSettingsEnabled()); | 654 plugin_status_pref_setter_.IsPepperFlashSettingsEnabled()); |
655 web_ui()->CallJavascriptFunctionUnsafe( | 655 web_ui()->CallJavascriptFunctionUnsafe( |
656 "options.OptionsPage.setPepperFlashSettingsEnabled", enabled); | 656 "options.OptionsPage.setPepperFlashSettingsEnabled", enabled); |
657 } | 657 } |
658 | 658 |
659 bool CoreOptionsHandler::IsUserUnsupervised(const base::Value* to_value) { | 659 bool CoreOptionsHandler::IsUserUnsupervised(const base::Value* to_value) { |
660 return !Profile::FromWebUI(web_ui())->IsSupervised(); | 660 return !Profile::FromWebUI(web_ui())->IsSupervised(); |
661 } | 661 } |
662 | 662 |
663 } // namespace options | 663 } // namespace options |
OLD | NEW |