OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |