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

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

Issue 13949011: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 DownloadItem* item, net::Error error) { 294 DownloadItem* item, net::Error error) {
295 if (!item) { 295 if (!item) {
296 DCHECK_NE(net::OK, error); 296 DCHECK_NE(net::OK, error);
297 ReportFailure(net::ErrorToString(error), FAILURE_REASON_OTHER); 297 ReportFailure(net::ErrorToString(error), FAILURE_REASON_OTHER);
298 return; 298 return;
299 } 299 }
300 300
301 DCHECK_EQ(net::OK, error); 301 DCHECK_EQ(net::OK, error);
302 download_item_ = item; 302 download_item_ = item;
303 download_item_->AddObserver(this); 303 download_item_->AddObserver(this);
304 if (approval_.get()) 304 if (approval_)
305 download_item_->SetUserData(kApprovalKey, approval_.release()); 305 download_item_->SetUserData(kApprovalKey, approval_.release());
306 if (delegate_) 306 if (delegate_)
307 delegate_->OnExtensionDownloadStarted(id_, download_item_); 307 delegate_->OnExtensionDownloadStarted(id_, download_item_);
308 } 308 }
309 309
310 void WebstoreInstaller::OnDownloadUpdated(DownloadItem* download) { 310 void WebstoreInstaller::OnDownloadUpdated(DownloadItem* download) {
311 CHECK_EQ(download_item_, download); 311 CHECK_EQ(download_item_, download);
312 312
313 switch (download->GetState()) { 313 switch (download->GetState()) {
314 case DownloadItem::CANCELLED: 314 case DownloadItem::CANCELLED:
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 void WebstoreInstaller::ReportSuccess() { 424 void WebstoreInstaller::ReportSuccess() {
425 if (delegate_) { 425 if (delegate_) {
426 delegate_->OnExtensionInstallSuccess(id_); 426 delegate_->OnExtensionInstallSuccess(id_);
427 delegate_ = NULL; 427 delegate_ = NULL;
428 } 428 }
429 429
430 Release(); // Balanced in Start(). 430 Release(); // Balanced in Start().
431 } 431 }
432 432
433 } // namespace extensions 433 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_install_helper.cc ('k') | chrome/browser/extensions/webstore_standalone_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698