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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 base::WeakPtr<KioskAppData> client_; | 388 base::WeakPtr<KioskAppData> client_; |
389 | 389 |
390 DISALLOW_COPY_AND_ASSIGN(WebstoreDataParser); | 390 DISALLOW_COPY_AND_ASSIGN(WebstoreDataParser); |
391 }; | 391 }; |
392 | 392 |
393 //////////////////////////////////////////////////////////////////////////////// | 393 //////////////////////////////////////////////////////////////////////////////// |
394 // KioskAppData | 394 // KioskAppData |
395 | 395 |
396 KioskAppData::KioskAppData(KioskAppDataDelegate* delegate, | 396 KioskAppData::KioskAppData(KioskAppDataDelegate* delegate, |
397 const std::string& app_id, | 397 const std::string& app_id, |
398 const std::string& user_id, | 398 const AccountId& account_id, |
399 const GURL& update_url) | 399 const GURL& update_url) |
400 : delegate_(delegate), | 400 : delegate_(delegate), |
401 status_(STATUS_INIT), | 401 status_(STATUS_INIT), |
402 app_id_(app_id), | 402 app_id_(app_id), |
403 user_id_(user_id), | 403 account_id_(account_id), |
404 update_url_(update_url) { | 404 update_url_(update_url) {} |
405 } | |
406 | 405 |
407 KioskAppData::~KioskAppData() {} | 406 KioskAppData::~KioskAppData() {} |
408 | 407 |
409 void KioskAppData::Load() { | 408 void KioskAppData::Load() { |
410 SetStatus(STATUS_LOADING); | 409 SetStatus(STATUS_LOADING); |
411 | 410 |
412 if (LoadFromCache()) | 411 if (LoadFromCache()) |
413 return; | 412 return; |
414 | 413 |
415 StartFetch(); | 414 StartFetch(); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 | 702 |
704 SkBitmap icon = crx_loader->icon(); | 703 SkBitmap icon = crx_loader->icon(); |
705 if (icon.empty()) | 704 if (icon.empty()) |
706 icon = *extensions::util::GetDefaultAppIcon().bitmap(); | 705 icon = *extensions::util::GetDefaultAppIcon().bitmap(); |
707 SetCache(crx_loader->name(), icon, crx_loader->required_platform_version()); | 706 SetCache(crx_loader->name(), icon, crx_loader->required_platform_version()); |
708 | 707 |
709 SetStatus(STATUS_LOADED); | 708 SetStatus(STATUS_LOADED); |
710 } | 709 } |
711 | 710 |
712 } // namespace chromeos | 711 } // namespace chromeos |
OLD | NEW |