| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chromeos/app_mode/kiosk_app_data.h" | 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_data.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 base::WeakPtr<KioskAppData> client_; | 362 base::WeakPtr<KioskAppData> client_; |
| 363 | 363 |
| 364 DISALLOW_COPY_AND_ASSIGN(WebstoreDataParser); | 364 DISALLOW_COPY_AND_ASSIGN(WebstoreDataParser); |
| 365 }; | 365 }; |
| 366 | 366 |
| 367 //////////////////////////////////////////////////////////////////////////////// | 367 //////////////////////////////////////////////////////////////////////////////// |
| 368 // KioskAppData | 368 // KioskAppData |
| 369 | 369 |
| 370 KioskAppData::KioskAppData(KioskAppDataDelegate* delegate, | 370 KioskAppData::KioskAppData(KioskAppDataDelegate* delegate, |
| 371 const std::string& app_id, | 371 const std::string& app_id, |
| 372 const std::string& user_id, | 372 const AccountId& account_id, |
| 373 const GURL& update_url) | 373 const GURL& update_url) |
| 374 : delegate_(delegate), | 374 : delegate_(delegate), |
| 375 status_(STATUS_INIT), | 375 status_(STATUS_INIT), |
| 376 app_id_(app_id), | 376 app_id_(app_id), |
| 377 user_id_(user_id), | 377 account_id_(account_id), |
| 378 update_url_(update_url) { | 378 update_url_(update_url) {} |
| 379 } | |
| 380 | 379 |
| 381 KioskAppData::~KioskAppData() {} | 380 KioskAppData::~KioskAppData() {} |
| 382 | 381 |
| 383 void KioskAppData::Load() { | 382 void KioskAppData::Load() { |
| 384 SetStatus(STATUS_LOADING); | 383 SetStatus(STATUS_LOADING); |
| 385 | 384 |
| 386 if (LoadFromCache()) | 385 if (LoadFromCache()) |
| 387 return; | 386 return; |
| 388 | 387 |
| 389 StartFetch(); | 388 StartFetch(); |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 | 653 |
| 655 SkBitmap icon = crx_loader->icon(); | 654 SkBitmap icon = crx_loader->icon(); |
| 656 if (icon.empty()) | 655 if (icon.empty()) |
| 657 icon = *extensions::util::GetDefaultAppIcon().bitmap(); | 656 icon = *extensions::util::GetDefaultAppIcon().bitmap(); |
| 658 SetCache(crx_loader->name(), icon); | 657 SetCache(crx_loader->name(), icon); |
| 659 | 658 |
| 660 SetStatus(STATUS_LOADED); | 659 SetStatus(STATUS_LOADED); |
| 661 } | 660 } |
| 662 | 661 |
| 663 } // namespace chromeos | 662 } // namespace chromeos |
| OLD | NEW |