OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/settings/settings_default_browser_handler.h" | 5 #include "chrome/browser/ui/webui/settings/settings_default_browser_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "base/metrics/user_metrics.h" | 9 #include "base/metrics/user_metrics.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 base::DictionaryValue dict; | 91 base::DictionaryValue dict; |
92 dict.SetBoolean("isDefault", state == shell_integration::IS_DEFAULT); | 92 dict.SetBoolean("isDefault", state == shell_integration::IS_DEFAULT); |
93 dict.SetBoolean("canBeDefault", | 93 dict.SetBoolean("canBeDefault", |
94 shell_integration::CanSetAsDefaultBrowser()); | 94 shell_integration::CanSetAsDefaultBrowser()); |
95 dict.SetBoolean("isUnknownError", | 95 dict.SetBoolean("isUnknownError", |
96 state == shell_integration::UNKNOWN_DEFAULT); | 96 state == shell_integration::UNKNOWN_DEFAULT); |
97 dict.SetBoolean("isDisabledByPolicy", DefaultBrowserIsDisabledByPolicy()); | 97 dict.SetBoolean("isDisabledByPolicy", DefaultBrowserIsDisabledByPolicy()); |
98 | 98 |
99 CallJavascriptFunction("cr.webUIListenerCallback", | 99 CallJavascriptFunction("cr.webUIListenerCallback", |
100 base::StringValue("settings.updateDefaultBrowserState"), dict); | 100 base::Value("settings.updateDefaultBrowserState"), |
| 101 dict); |
101 } | 102 } |
102 | 103 |
103 } // namespace settings | 104 } // namespace settings |
OLD | NEW |