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

Side by Side Diff: chrome/browser/ui/webui/settings/settings_default_browser_handler.cc

Issue 2886083002: MD Settings: Use FireWebUIListener() helper wherever possible. (Closed)
Patch Set: Fixed typo Created 3 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
OLDNEW
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 base::DictionaryValue dict; 96 base::DictionaryValue dict;
97 dict.SetBoolean("isDefault", state == shell_integration::IS_DEFAULT); 97 dict.SetBoolean("isDefault", state == shell_integration::IS_DEFAULT);
98 dict.SetBoolean("canBeDefault", 98 dict.SetBoolean("canBeDefault",
99 shell_integration::CanSetAsDefaultBrowser()); 99 shell_integration::CanSetAsDefaultBrowser());
100 dict.SetBoolean("isUnknownError", 100 dict.SetBoolean("isUnknownError",
101 state == shell_integration::UNKNOWN_DEFAULT); 101 state == shell_integration::UNKNOWN_DEFAULT);
102 dict.SetBoolean("isDisabledByPolicy", DefaultBrowserIsDisabledByPolicy()); 102 dict.SetBoolean("isDisabledByPolicy", DefaultBrowserIsDisabledByPolicy());
103 103
104 CallJavascriptFunction("cr.webUIListenerCallback", 104 FireWebUIListener("settings.updateDefaultBrowserState", dict);
105 base::Value("settings.updateDefaultBrowserState"),
106 dict);
107 } 105 }
108 106
109 } // namespace settings 107 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698