OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/webstore_installer.h" | 5 #include "chrome/browser/extensions/webstore_installer.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 301 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
302 AddRef(); // Balanced in ReportSuccess and ReportFailure. | 302 AddRef(); // Balanced in ReportSuccess and ReportFailure. |
303 | 303 |
304 if (!crx_file::id_util::IdIsValid(id_)) { | 304 if (!crx_file::id_util::IdIsValid(id_)) { |
305 ReportFailure(kInvalidIdError, FAILURE_REASON_OTHER); | 305 ReportFailure(kInvalidIdError, FAILURE_REASON_OTHER); |
306 return; | 306 return; |
307 } | 307 } |
308 | 308 |
309 ExtensionService* extension_service = | 309 ExtensionService* extension_service = |
310 ExtensionSystem::Get(profile_)->extension_service(); | 310 ExtensionSystem::Get(profile_)->extension_service(); |
311 if (approval_.get() && approval_->dummy_extension) { | 311 if (approval_.get() && approval_->dummy_extension.get()) { |
312 SharedModuleService::ImportStatus status = | 312 SharedModuleService::ImportStatus status = |
313 extension_service->shared_module_service()->CheckImports( | 313 extension_service->shared_module_service()->CheckImports( |
314 approval_->dummy_extension, | 314 approval_->dummy_extension.get(), |
315 &pending_modules_, | 315 &pending_modules_, |
316 &pending_modules_); | 316 &pending_modules_); |
317 // For this case, it is because some imports are not shared modules. | 317 // For this case, it is because some imports are not shared modules. |
318 if (status == SharedModuleService::IMPORT_STATUS_UNRECOVERABLE) { | 318 if (status == SharedModuleService::IMPORT_STATUS_UNRECOVERABLE) { |
319 ReportFailure(kDependencyNotSharedModuleError, | 319 ReportFailure(kDependencyNotSharedModuleError, |
320 FAILURE_REASON_DEPENDENCY_NOT_SHARED_MODULE); | 320 FAILURE_REASON_DEPENDENCY_NOT_SHARED_MODULE); |
321 return; | 321 return; |
322 } | 322 } |
323 } | 323 } |
324 | 324 |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 1, | 745 1, |
746 kMaxSizeKb, | 746 kMaxSizeKb, |
747 kNumBuckets); | 747 kNumBuckets); |
748 } | 748 } |
749 UMA_HISTOGRAM_BOOLEAN( | 749 UMA_HISTOGRAM_BOOLEAN( |
750 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", | 750 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", |
751 total_bytes <= 0); | 751 total_bytes <= 0); |
752 } | 752 } |
753 | 753 |
754 } // namespace extensions | 754 } // namespace extensions |
OLD | NEW |