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

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

Issue 7121013: Initial implementation of network screen WebUI handler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compile Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/eula_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "grit/browser_resources.h" 8 #include "grit/browser_resources.h"
9 #include "grit/chromium_strings.h" 9 #include "grit/chromium_strings.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 scoped_ptr<Value> value(Value::CreateBooleanValue(true)); 52 scoped_ptr<Value> value(Value::CreateBooleanValue(true));
53 web_ui_->CallJavascriptFunction("setUsageStats", *value); 53 web_ui_->CallJavascriptFunction("setUsageStats", *value);
54 } 54 }
55 55
56 void EulaScreenHandler::RegisterMessages() { 56 void EulaScreenHandler::RegisterMessages() {
57 web_ui_->RegisterMessageCallback("eulaOnExit", 57 web_ui_->RegisterMessageCallback("eulaOnExit",
58 NewCallback(this, &EulaScreenHandler::OnExit)); 58 NewCallback(this, &EulaScreenHandler::OnExit));
59 } 59 }
60 60
61 void EulaScreenHandler::OnExit(const ListValue* args) { 61 void EulaScreenHandler::OnExit(const ListValue* args) {
62 DCHECK(args->GetSize() == 2);
63
62 bool accepted = false; 64 bool accepted = false;
63 if (!args->GetBoolean(0, &accepted)) 65 if (!args->GetBoolean(0, &accepted))
64 NOTREACHED(); 66 NOTREACHED();
65 67
66 bool is_usage_stats_checked = false; 68 bool is_usage_stats_checked = false;
67 if (!args->GetBoolean(1, &is_usage_stats_checked)) 69 if (!args->GetBoolean(1, &is_usage_stats_checked))
68 NOTREACHED(); 70 NOTREACHED();
69 71
70 DCHECK(args->GetSize() == 2);
71
72 if (!delegate_) 72 if (!delegate_)
73 return; 73 return;
74 74
75 delegate_->OnExit(accepted, is_usage_stats_checked); 75 delegate_->OnExit(accepted, is_usage_stats_checked);
76 } 76 }
77 77
78 } // namespace chromeos 78 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698