| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 const std::string& required_platform_version() const { | 119 const std::string& required_platform_version() const { |
| 120 return required_platform_version_; | 120 return required_platform_version_; |
| 121 } | 121 } |
| 122 | 122 |
| 123 private: | 123 private: |
| 124 ~CrxLoader() override {}; | 124 ~CrxLoader() override {}; |
| 125 | 125 |
| 126 // extensions::SandboxedUnpackerClient | 126 // extensions::SandboxedUnpackerClient |
| 127 void OnUnpackSuccess(const base::FilePath& temp_dir, | 127 void OnUnpackSuccess(const base::FilePath& temp_dir, |
| 128 const base::FilePath& extension_root, | 128 const base::FilePath& extension_root, |
| 129 const base::DictionaryValue* original_manifest, | 129 std::unique_ptr<base::DictionaryValue> original_manifest, |
| 130 const extensions::Extension* extension, | 130 const extensions::Extension* extension, |
| 131 const SkBitmap& install_icon) override { | 131 const SkBitmap& install_icon) override { |
| 132 DCHECK(task_runner_->RunsTasksOnCurrentThread()); | 132 DCHECK(task_runner_->RunsTasksOnCurrentThread()); |
| 133 | 133 |
| 134 const extensions::KioskModeInfo* info = | 134 const extensions::KioskModeInfo* info = |
| 135 extensions::KioskModeInfo::Get(extension); | 135 extensions::KioskModeInfo::Get(extension); |
| 136 if (info == nullptr) { | 136 if (info == nullptr) { |
| 137 LOG(ERROR) << extension->id() << " is not a valid kiosk app."; | 137 LOG(ERROR) << extension->id() << " is not a valid kiosk app."; |
| 138 success_ = false; | 138 success_ = false; |
| 139 } else { | 139 } else { |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 | 720 |
| 721 SkBitmap icon = crx_loader->icon(); | 721 SkBitmap icon = crx_loader->icon(); |
| 722 if (icon.empty()) | 722 if (icon.empty()) |
| 723 icon = *extensions::util::GetDefaultAppIcon().bitmap(); | 723 icon = *extensions::util::GetDefaultAppIcon().bitmap(); |
| 724 SetCache(crx_loader->name(), icon, crx_loader->required_platform_version()); | 724 SetCache(crx_loader->name(), icon, crx_loader->required_platform_version()); |
| 725 | 725 |
| 726 SetStatus(STATUS_LOADED); | 726 SetStatus(STATUS_LOADED); |
| 727 } | 727 } |
| 728 | 728 |
| 729 } // namespace chromeos | 729 } // namespace chromeos |
| OLD | NEW |