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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/enable_debugging_screen_handler.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/chromeos/login/enable_debugging_screen_handler .h" 5 #include "chrome/browser/ui/webui/chromeos/login/enable_debugging_screen_handler .h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 if (state == UI_STATE_SETUP || 268 if (state == UI_STATE_SETUP ||
269 state == UI_STATE_ERROR || 269 state == UI_STATE_ERROR ||
270 state == UI_STATE_DONE) { 270 state == UI_STATE_DONE) {
271 PrefService* prefs = g_browser_process->local_state(); 271 PrefService* prefs = g_browser_process->local_state();
272 prefs->ClearPref(prefs::kDebuggingFeaturesRequested); 272 prefs->ClearPref(prefs::kDebuggingFeaturesRequested);
273 prefs->CommitPendingWrite(); 273 prefs->CommitPendingWrite();
274 } 274 }
275 275
276 web_ui()->CallJavascriptFunctionUnsafe( 276 web_ui()->CallJavascriptFunctionUnsafe(
277 "login.EnableDebuggingScreen.updateState", 277 "login.EnableDebuggingScreen.updateState",
278 base::FundamentalValue(static_cast<int>(state))); 278 base::Value(static_cast<int>(state)));
279 } 279 }
280 280
281 void EnableDebuggingScreenHandler::HandleOnLearnMore() { 281 void EnableDebuggingScreenHandler::HandleOnLearnMore() {
282 VLOG(1) << "Trying to view the help article about debugging features."; 282 VLOG(1) << "Trying to view the help article about debugging features.";
283 const std::string help_content = 283 const std::string help_content =
284 l10n_util::GetStringUTF8(IDS_ENABLE_DEBUGGING_HELP); 284 l10n_util::GetStringUTF8(IDS_ENABLE_DEBUGGING_HELP);
285 const GURL data_url = GURL("data:text/html;charset=utf-8," + help_content); 285 const GURL data_url = GURL("data:text/html;charset=utf-8," + help_content);
286 286
287 LoginWebDialog* dialog = new LoginWebDialog( 287 LoginWebDialog* dialog = new LoginWebDialog(
288 Profile::FromWebUI(web_ui()), 288 Profile::FromWebUI(web_ui()),
289 NULL, 289 NULL,
290 GetNativeWindow(), 290 GetNativeWindow(),
291 base::string16(), 291 base::string16(),
292 data_url); 292 data_url);
293 dialog->Show(); 293 dialog->Show();
294 } 294 }
295 295
296 } // namespace chromeos 296 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc ('k') | chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698