| 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 break; | 378 break; |
| 379 } | 379 } |
| 380 | 380 |
| 381 default: | 381 default: |
| 382 NOTREACHED(); | 382 NOTREACHED(); |
| 383 } | 383 } |
| 384 } | 384 } |
| 385 | 385 |
| 386 void WebstoreInstaller::OnExtensionInstalled( | 386 void WebstoreInstaller::OnExtensionInstalled( |
| 387 content::BrowserContext* browser_context, | 387 content::BrowserContext* browser_context, |
| 388 const Extension* extension) { | 388 const Extension* extension, |
| 389 bool is_update) { |
| 389 CHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context))); | 390 CHECK(profile_->IsSameProfile(Profile::FromBrowserContext(browser_context))); |
| 390 if (pending_modules_.empty()) | 391 if (pending_modules_.empty()) |
| 391 return; | 392 return; |
| 392 SharedModuleInfo::ImportInfo info = pending_modules_.front(); | 393 SharedModuleInfo::ImportInfo info = pending_modules_.front(); |
| 393 if (extension->id() != info.extension_id) | 394 if (extension->id() != info.extension_id) |
| 394 return; | 395 return; |
| 395 pending_modules_.pop_front(); | 396 pending_modules_.pop_front(); |
| 396 | 397 |
| 397 // Clean up local state from the current download. | 398 // Clean up local state from the current download. |
| 398 if (download_item_) { | 399 if (download_item_) { |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 1, | 743 1, |
| 743 kMaxSizeKb, | 744 kMaxSizeKb, |
| 744 kNumBuckets); | 745 kNumBuckets); |
| 745 } | 746 } |
| 746 UMA_HISTOGRAM_BOOLEAN( | 747 UMA_HISTOGRAM_BOOLEAN( |
| 747 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", | 748 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", |
| 748 total_bytes <= 0); | 749 total_bytes <= 0); |
| 749 } | 750 } |
| 750 | 751 |
| 751 } // namespace extensions | 752 } // namespace extensions |
| OLD | NEW |