| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 if (!temp_dir_.CreateUniqueTempDir()) { | 156 if (!temp_dir_.CreateUniqueTempDir()) { |
| 157 success_ = false; | 157 success_ = false; |
| 158 NotifyFinishedOnBlockingPool(); | 158 NotifyFinishedOnBlockingPool(); |
| 159 return; | 159 return; |
| 160 } | 160 } |
| 161 | 161 |
| 162 scoped_refptr<extensions::SandboxedUnpacker> unpacker( | 162 scoped_refptr<extensions::SandboxedUnpacker> unpacker( |
| 163 new extensions::SandboxedUnpacker( | 163 new extensions::SandboxedUnpacker( |
| 164 extensions::Manifest::INTERNAL, extensions::Extension::NO_FLAGS, | 164 extensions::Manifest::INTERNAL, extensions::Extension::NO_FLAGS, |
| 165 temp_dir_.path(), task_runner_.get(), this)); | 165 temp_dir_.GetPath(), task_runner_.get(), this)); |
| 166 unpacker->StartWithCrx(extensions::CRXFileInfo(crx_file_)); | 166 unpacker->StartWithCrx(extensions::CRXFileInfo(crx_file_)); |
| 167 } | 167 } |
| 168 | 168 |
| 169 void NotifyFinishedOnBlockingPool() { | 169 void NotifyFinishedOnBlockingPool() { |
| 170 DCHECK(task_runner_->RunsTasksOnCurrentThread()); | 170 DCHECK(task_runner_->RunsTasksOnCurrentThread()); |
| 171 | 171 |
| 172 if (!temp_dir_.Delete()) { | 172 if (!temp_dir_.Delete()) { |
| 173 LOG(WARNING) << "Can not delete temp directory at " | 173 LOG(WARNING) << "Can not delete temp directory at " |
| 174 << temp_dir_.path().value(); | 174 << temp_dir_.GetPath().value(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 BrowserThread::PostTask( | 177 BrowserThread::PostTask( |
| 178 BrowserThread::UI, FROM_HERE, | 178 BrowserThread::UI, FROM_HERE, |
| 179 base::Bind(&CrxLoader::NotifyFinishedOnUIThread, this)); | 179 base::Bind(&CrxLoader::NotifyFinishedOnUIThread, this)); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void NotifyFinishedOnUIThread() { | 182 void NotifyFinishedOnUIThread() { |
| 183 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 183 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 184 | 184 |
| (...skipping 533 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 |