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