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

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

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 (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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 if (state == UI_STATE_SETUP || 263 if (state == UI_STATE_SETUP ||
264 state == UI_STATE_ERROR || 264 state == UI_STATE_ERROR ||
265 state == UI_STATE_DONE) { 265 state == UI_STATE_DONE) {
266 PrefService* prefs = g_browser_process->local_state(); 266 PrefService* prefs = g_browser_process->local_state();
267 prefs->ClearPref(prefs::kDebuggingFeaturesRequested); 267 prefs->ClearPref(prefs::kDebuggingFeaturesRequested);
268 prefs->CommitPendingWrite(); 268 prefs->CommitPendingWrite();
269 } 269 }
270 270
271 web_ui()->CallJavascriptFunctionUnsafe( 271 web_ui()->CallJavascriptFunctionUnsafe(
272 "login.EnableDebuggingScreen.updateState", 272 "login.EnableDebuggingScreen.updateState",
273 base::FundamentalValue(static_cast<int>(state))); 273 base::Value(static_cast<int>(state)));
274 } 274 }
275 275
276 void EnableDebuggingScreenHandler::HandleOnLearnMore() { 276 void EnableDebuggingScreenHandler::HandleOnLearnMore() {
277 VLOG(1) << "Trying to view the help article about debugging features."; 277 VLOG(1) << "Trying to view the help article about debugging features.";
278 const std::string help_content = 278 const std::string help_content =
279 l10n_util::GetStringUTF8(IDS_ENABLE_DEBUGGING_HELP); 279 l10n_util::GetStringUTF8(IDS_ENABLE_DEBUGGING_HELP);
280 const GURL data_url = GURL("data:text/html;charset=utf-8," + help_content); 280 const GURL data_url = GURL("data:text/html;charset=utf-8," + help_content);
281 281
282 LoginWebDialog* dialog = new LoginWebDialog( 282 LoginWebDialog* dialog = new LoginWebDialog(
283 Profile::FromWebUI(web_ui()), 283 Profile::FromWebUI(web_ui()),
284 NULL, 284 NULL,
285 GetNativeWindow(), 285 GetNativeWindow(),
286 base::string16(), 286 base::string16(),
287 data_url); 287 data_url);
288 dialog->Show(); 288 dialog->Show();
289 } 289 }
290 290
291 } // namespace chromeos 291 } // 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