Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/browser/extensions/webstore_installer.cc

Issue 334633003: Fix a crash during installing an extension with shared modules. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compositor_api_impl_new_1
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 } 485 }
486 486
487 if (!download_started_) { 487 if (!download_started_) {
488 if (delegate_) 488 if (delegate_)
489 delegate_->OnExtensionDownloadStarted(id_, download_item_); 489 delegate_->OnExtensionDownloadStarted(id_, download_item_);
490 download_started_ = true; 490 download_started_ = true;
491 } 491 }
492 } 492 }
493 493
494 void WebstoreInstaller::OnDownloadUpdated(DownloadItem* download) { 494 void WebstoreInstaller::OnDownloadUpdated(DownloadItem* download) {
495 CHECK_EQ(download_item_, download); 495 // DownloadItemImpl calls the observer for a completed item, ignore it.
496 if (download_item_ != download)
497 return;
496 498
497 switch (download->GetState()) { 499 switch (download->GetState()) {
498 case DownloadItem::CANCELLED: 500 case DownloadItem::CANCELLED:
499 ReportFailure(kDownloadCanceledError, FAILURE_REASON_CANCELLED); 501 ReportFailure(kDownloadCanceledError, FAILURE_REASON_CANCELLED);
500 break; 502 break;
501 case DownloadItem::INTERRUPTED: 503 case DownloadItem::INTERRUPTED:
502 RecordInterrupt(download); 504 RecordInterrupt(download);
503 ReportFailure(kDownloadInterruptedError, FAILURE_REASON_OTHER); 505 ReportFailure(kDownloadInterruptedError, FAILURE_REASON_OTHER);
504 break; 506 break;
505 case DownloadItem::COMPLETE: 507 case DownloadItem::COMPLETE:
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 1, 752 1,
751 kMaxSizeKb, 753 kMaxSizeKb,
752 kNumBuckets); 754 kNumBuckets);
753 } 755 }
754 UMA_HISTOGRAM_BOOLEAN( 756 UMA_HISTOGRAM_BOOLEAN(
755 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", 757 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown",
756 total_bytes <= 0); 758 total_bytes <= 0);
757 } 759 }
758 760
759 } // namespace extensions 761 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698