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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 | 396 |
397 default: | 397 default: |
398 NOTREACHED(); | 398 NOTREACHED(); |
399 } | 399 } |
400 } | 400 } |
401 | 401 |
402 void WebstoreInstaller::OnExtensionWillBeInstalled( | 402 void WebstoreInstaller::OnExtensionWillBeInstalled( |
403 content::BrowserContext* browser_context, | 403 content::BrowserContext* browser_context, |
404 const Extension* extension, | 404 const Extension* extension, |
405 bool is_update, | 405 bool is_update, |
| 406 bool from_ephemeral, |
406 const std::string& old_name) { | 407 const std::string& old_name) { |
407 CHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context))); | 408 CHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context))); |
408 if (pending_modules_.empty()) | 409 if (pending_modules_.empty()) |
409 return; | 410 return; |
410 SharedModuleInfo::ImportInfo info = pending_modules_.front(); | 411 SharedModuleInfo::ImportInfo info = pending_modules_.front(); |
411 if (extension->id() != info.extension_id) | 412 if (extension->id() != info.extension_id) |
412 return; | 413 return; |
413 pending_modules_.pop_front(); | 414 pending_modules_.pop_front(); |
414 | 415 |
415 if (pending_modules_.empty()) { | 416 if (pending_modules_.empty()) { |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 1, | 750 1, |
750 kMaxSizeKb, | 751 kMaxSizeKb, |
751 kNumBuckets); | 752 kNumBuckets); |
752 } | 753 } |
753 UMA_HISTOGRAM_BOOLEAN( | 754 UMA_HISTOGRAM_BOOLEAN( |
754 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", | 755 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", |
755 total_bytes <= 0); | 756 total_bytes <= 0); |
756 } | 757 } |
757 | 758 |
758 } // namespace extensions | 759 } // namespace extensions |
OLD | NEW |