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

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

Issue 6776019: [cros] Create SIM unlock dialog wrapper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 8 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
« no previous file with comments | « chrome/browser/resources/chromeos/sim_unlock.js ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/sim_unlock_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/sim_unlock_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 SimUnlockCode code_type) { 279 SimUnlockCode code_type) {
280 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 280 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
281 // TODO(nkostylev): Pass PIN/PUK code to flimflam. 281 // TODO(nkostylev): Pass PIN/PUK code to flimflam.
282 ProcessSimCardState(GetCellularNetwork()); 282 ProcessSimCardState(GetCellularNetwork());
283 } 283 }
284 284
285 void SimUnlockHandler::GetSimInfo(chromeos::CellularNetwork* network, 285 void SimUnlockHandler::GetSimInfo(chromeos::CellularNetwork* network,
286 DictionaryValue* value) { 286 DictionaryValue* value) {
287 if (network) { 287 if (network) {
288 // TODO(nkostylev): Extract real tries left information. 288 // TODO(nkostylev): Extract real tries left information.
289 // value.SetInteger(kTriesLeft, tries); 289 // value->SetInteger(kTriesLeft, tries);
290 } 290 }
291 } 291 }
292 292
293 void SimUnlockHandler::HandleEnterCode(const ListValue* args, 293 void SimUnlockHandler::HandleEnterCode(const ListValue* args,
294 SimUnlockCode code_type) { 294 SimUnlockCode code_type) {
295 const size_t kEnterCodeParamCount = 1; 295 const size_t kEnterCodeParamCount = 1;
296 std::string code; 296 std::string code;
297 if (args->GetSize() != kEnterCodeParamCount || 297 if (args->GetSize() != kEnterCodeParamCount ||
298 !args->GetString(0, &code)) { 298 !args->GetString(0, &code)) {
299 NOTREACHED(); 299 NOTREACHED();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 SimUnlockHandler* handler = new SimUnlockHandler(); 378 SimUnlockHandler* handler = new SimUnlockHandler();
379 AddMessageHandler((handler)->Attach(this)); 379 AddMessageHandler((handler)->Attach(this));
380 handler->Init(contents); 380 handler->Init(contents);
381 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); 381 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource();
382 382
383 // Set up the chrome://sim-unlock/ source. 383 // Set up the chrome://sim-unlock/ source.
384 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); 384 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
385 } 385 }
386 386
387 } // namespace chromeos 387 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/sim_unlock.js ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698