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

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

Issue 10815024: Revert 147594 - NaCl: Remove two uses of '#include "nacl/nacl_log.h"' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 void WebstoreInstaller::Start() { 199 void WebstoreInstaller::Start() {
200 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 200 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
201 AddRef(); // Balanced in ReportSuccess and ReportFailure. 201 AddRef(); // Balanced in ReportSuccess and ReportFailure.
202 202
203 if (!Extension::IdIsValid(id_)) { 203 if (!Extension::IdIsValid(id_)) {
204 ReportFailure(kInvalidIdError); 204 ReportFailure(kInvalidIdError);
205 return; 205 return;
206 } 206 }
207 207
208 FilePath download_path = DownloadPrefs::FromDownloadManager( 208 FilePath download_path = DownloadPrefs::FromDownloadManager(
209 BrowserContext::GetDownloadManager(profile_))->download_path(); 209 BrowserContext::GetDownloadManager(profile_))->DownloadPath();
210 BrowserThread::PostTask( 210 BrowserThread::PostTask(
211 BrowserThread::FILE, FROM_HERE, 211 BrowserThread::FILE, FROM_HERE,
212 base::Bind(&GetDownloadFilePath, download_path, id_, 212 base::Bind(&GetDownloadFilePath, download_path, id_,
213 base::Bind(&WebstoreInstaller::StartDownload, this))); 213 base::Bind(&WebstoreInstaller::StartDownload, this)));
214 } 214 }
215 215
216 void WebstoreInstaller::Observe(int type, 216 void WebstoreInstaller::Observe(int type,
217 const content::NotificationSource& source, 217 const content::NotificationSource& source,
218 const content::NotificationDetails& details) { 218 const content::NotificationDetails& details) {
219 switch (type) { 219 switch (type) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 void WebstoreInstaller::ReportSuccess() { 353 void WebstoreInstaller::ReportSuccess() {
354 if (delegate_) { 354 if (delegate_) {
355 delegate_->OnExtensionInstallSuccess(id_); 355 delegate_->OnExtensionInstallSuccess(id_);
356 delegate_ = NULL; 356 delegate_ = NULL;
357 } 357 }
358 358
359 Release(); // Balanced in Start(). 359 Release(); // Balanced in Start().
360 } 360 }
361 361
362 } // namespace extensions 362 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/usb/usb_device_resource.cc ('k') | chrome/browser/ui/ash/screenshot_taker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698