| 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 <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 const std::string& id, | 234 const std::string& id, |
| 235 content::DownloadItem* item) { | 235 content::DownloadItem* item) { |
| 236 } | 236 } |
| 237 | 237 |
| 238 WebstoreInstaller::Approval::Approval() | 238 WebstoreInstaller::Approval::Approval() |
| 239 : profile(NULL), | 239 : profile(NULL), |
| 240 use_app_installed_bubble(false), | 240 use_app_installed_bubble(false), |
| 241 skip_post_install_ui(false), | 241 skip_post_install_ui(false), |
| 242 skip_install_dialog(false), | 242 skip_install_dialog(false), |
| 243 enable_launcher(false), | 243 enable_launcher(false), |
| 244 manifest_check_level(MANIFEST_CHECK_LEVEL_STRICT), | 244 manifest_check_level(MANIFEST_CHECK_LEVEL_STRICT) { |
| 245 is_ephemeral(false) { | |
| 246 } | 245 } |
| 247 | 246 |
| 248 scoped_ptr<WebstoreInstaller::Approval> | 247 scoped_ptr<WebstoreInstaller::Approval> |
| 249 WebstoreInstaller::Approval::CreateWithInstallPrompt(Profile* profile) { | 248 WebstoreInstaller::Approval::CreateWithInstallPrompt(Profile* profile) { |
| 250 scoped_ptr<Approval> result(new Approval()); | 249 scoped_ptr<Approval> result(new Approval()); |
| 251 result->profile = profile; | 250 result->profile = profile; |
| 252 return result.Pass(); | 251 return result.Pass(); |
| 253 } | 252 } |
| 254 | 253 |
| 255 scoped_ptr<WebstoreInstaller::Approval> | 254 scoped_ptr<WebstoreInstaller::Approval> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 NOTREACHED(); | 350 NOTREACHED(); |
| 352 } | 351 } |
| 353 extensions::InstallTracker* tracker = | 352 extensions::InstallTracker* tracker = |
| 354 extensions::InstallTrackerFactory::GetForBrowserContext(profile_); | 353 extensions::InstallTrackerFactory::GetForBrowserContext(profile_); |
| 355 extensions::InstallObserver::ExtensionInstallParams params( | 354 extensions::InstallObserver::ExtensionInstallParams params( |
| 356 id_, | 355 id_, |
| 357 name, | 356 name, |
| 358 approval_->installing_icon, | 357 approval_->installing_icon, |
| 359 approval_->manifest->is_app(), | 358 approval_->manifest->is_app(), |
| 360 approval_->manifest->is_platform_app()); | 359 approval_->manifest->is_platform_app()); |
| 361 params.is_ephemeral = approval_->is_ephemeral; | |
| 362 tracker->OnBeginExtensionInstall(params); | 360 tracker->OnBeginExtensionInstall(params); |
| 363 | 361 |
| 364 tracker->OnBeginExtensionDownload(id_); | 362 tracker->OnBeginExtensionDownload(id_); |
| 365 | 363 |
| 366 // TODO(crbug.com/305343): Query manifest of dependencies before | 364 // TODO(crbug.com/305343): Query manifest of dependencies before |
| 367 // downloading & installing those dependencies. | 365 // downloading & installing those dependencies. |
| 368 DownloadNextPendingModule(); | 366 DownloadNextPendingModule(); |
| 369 } | 367 } |
| 370 | 368 |
| 371 void WebstoreInstaller::Observe(int type, | 369 void WebstoreInstaller::Observe(int type, |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 1, | 783 1, |
| 786 kMaxSizeKb, | 784 kMaxSizeKb, |
| 787 kNumBuckets); | 785 kNumBuckets); |
| 788 } | 786 } |
| 789 UMA_HISTOGRAM_BOOLEAN( | 787 UMA_HISTOGRAM_BOOLEAN( |
| 790 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", | 788 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", |
| 791 total_bytes <= 0); | 789 total_bytes <= 0); |
| 792 } | 790 } |
| 793 | 791 |
| 794 } // namespace extensions | 792 } // namespace extensions |
| OLD | NEW |