| 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/options2/browser_options_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/browser_options_handler2.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 enable ? base::Bind(&auto_launch_util::EnableForegroundStartAtLogin, | 894 enable ? base::Bind(&auto_launch_util::EnableForegroundStartAtLogin, |
| 895 profile->GetPath().BaseName().value(), FilePath()) : | 895 profile->GetPath().BaseName().value(), FilePath()) : |
| 896 base::Bind(&auto_launch_util::DisableForegroundStartAtLogin, | 896 base::Bind(&auto_launch_util::DisableForegroundStartAtLogin, |
| 897 profile->GetPath().BaseName().value())); | 897 profile->GetPath().BaseName().value())); |
| 898 #endif // OS_WIN | 898 #endif // OS_WIN |
| 899 } | 899 } |
| 900 | 900 |
| 901 void BrowserOptionsHandler::GetInstantFieldTrialStatus(const ListValue* args) { | 901 void BrowserOptionsHandler::GetInstantFieldTrialStatus(const ListValue* args) { |
| 902 Profile* profile = Profile::FromWebUI(web_ui()); | 902 Profile* profile = Profile::FromWebUI(web_ui()); |
| 903 base::FundamentalValue enabled( | 903 base::FundamentalValue enabled( |
| 904 InstantFieldTrial::IsInstantExperiment(profile) && | 904 !profile->GetPrefs()->GetBoolean(prefs::kInstantEnabled) && |
| 905 !InstantFieldTrial::IsHiddenExperiment(profile)); | 905 InstantFieldTrial::GetMode(profile) == InstantFieldTrial::INSTANT); |
| 906 web_ui()->CallJavascriptFunction("BrowserOptions.setInstantFieldTrialStatus", | 906 web_ui()->CallJavascriptFunction("BrowserOptions.setInstantFieldTrialStatus", |
| 907 enabled); | 907 enabled); |
| 908 } | 908 } |
| 909 | 909 |
| 910 scoped_ptr<ListValue> BrowserOptionsHandler::GetProfilesInfoList() { | 910 scoped_ptr<ListValue> BrowserOptionsHandler::GetProfilesInfoList() { |
| 911 ProfileInfoCache& cache = | 911 ProfileInfoCache& cache = |
| 912 g_browser_process->profile_manager()->GetProfileInfoCache(); | 912 g_browser_process->profile_manager()->GetProfileInfoCache(); |
| 913 scoped_ptr<ListValue> profile_info_list(new ListValue); | 913 scoped_ptr<ListValue> profile_info_list(new ListValue); |
| 914 FilePath current_profile_path = | 914 FilePath current_profile_path = |
| 915 web_ui()->GetWebContents()->GetBrowserContext()->GetPath(); | 915 web_ui()->GetWebContents()->GetBrowserContext()->GetPath(); |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1415 } | 1415 } |
| 1416 | 1416 |
| 1417 void BrowserOptionsHandler::SetupSSLConfigSettings() { | 1417 void BrowserOptionsHandler::SetupSSLConfigSettings() { |
| 1418 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); | 1418 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); |
| 1419 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); | 1419 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); |
| 1420 web_ui()->CallJavascriptFunction( | 1420 web_ui()->CallJavascriptFunction( |
| 1421 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); | 1421 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); |
| 1422 } | 1422 } |
| 1423 | 1423 |
| 1424 } // namespace options2 | 1424 } // namespace options2 |
| OLD | NEW |