| 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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 return; | 655 return; |
| 656 | 656 |
| 657 if (!CheckResponseKeyValue(webstore_data.get(), kLocalizedNameKey, &name_)) | 657 if (!CheckResponseKeyValue(webstore_data.get(), kLocalizedNameKey, &name_)) |
| 658 return; | 658 return; |
| 659 | 659 |
| 660 std::string icon_url_string; | 660 std::string icon_url_string; |
| 661 if (!CheckResponseKeyValue(webstore_data.get(), kIconUrlKey, | 661 if (!CheckResponseKeyValue(webstore_data.get(), kIconUrlKey, |
| 662 &icon_url_string)) | 662 &icon_url_string)) |
| 663 return; | 663 return; |
| 664 | 664 |
| 665 GURL icon_url = GURL(extension_urls::GetWebstoreLaunchURL()).Resolve( | 665 GURL icon_url = |
| 666 icon_url_string); | 666 extension_urls::GetWebstoreLaunchURL().Resolve(icon_url_string); |
| 667 if (!icon_url.is_valid()) { | 667 if (!icon_url.is_valid()) { |
| 668 LOG(ERROR) << "Webstore response error (icon url): " | 668 LOG(ERROR) << "Webstore response error (icon url): " |
| 669 << ValueToString(*webstore_data); | 669 << ValueToString(*webstore_data); |
| 670 OnWebstoreResponseParseFailure(kInvalidWebstoreResponseError); | 670 OnWebstoreResponseParseFailure(kInvalidWebstoreResponseError); |
| 671 return; | 671 return; |
| 672 } | 672 } |
| 673 | 673 |
| 674 // WebstoreDataParser deletes itself when done. | 674 // WebstoreDataParser deletes itself when done. |
| 675 (new WebstoreDataParser(AsWeakPtr()))->Start(app_id_, | 675 (new WebstoreDataParser(AsWeakPtr()))->Start(app_id_, |
| 676 manifest, | 676 manifest, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 | 718 |
| 719 SkBitmap icon = crx_loader->icon(); | 719 SkBitmap icon = crx_loader->icon(); |
| 720 if (icon.empty()) | 720 if (icon.empty()) |
| 721 icon = *extensions::util::GetDefaultAppIcon().bitmap(); | 721 icon = *extensions::util::GetDefaultAppIcon().bitmap(); |
| 722 SetCache(crx_loader->name(), icon, crx_loader->required_platform_version()); | 722 SetCache(crx_loader->name(), icon, crx_loader->required_platform_version()); |
| 723 | 723 |
| 724 SetStatus(STATUS_LOADED); | 724 SetStatus(STATUS_LOADED); |
| 725 } | 725 } |
| 726 | 726 |
| 727 } // namespace chromeos | 727 } // namespace chromeos |
| OLD | NEW |