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

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

Issue 11106007: drive: Rename 'gdata' namespace to 'drive' in chrome/browser/chromeos/drive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 // Must be executed on the FILE thread. 94 // Must be executed on the FILE thread.
95 void GetDownloadFilePath( 95 void GetDownloadFilePath(
96 const FilePath& download_directory, const std::string& id, 96 const FilePath& download_directory, const std::string& id,
97 const base::Callback<void(const FilePath&)>& callback) { 97 const base::Callback<void(const FilePath&)>& callback) {
98 FilePath directory(g_download_directory_for_tests ? 98 FilePath directory(g_download_directory_for_tests ?
99 *g_download_directory_for_tests : download_directory); 99 *g_download_directory_for_tests : download_directory);
100 100
101 #if defined (OS_CHROMEOS) 101 #if defined (OS_CHROMEOS)
102 // Do not use drive for extension downloads. 102 // Do not use drive for extension downloads.
103 if (gdata::util::IsUnderDriveMountPoint(directory)) 103 if (drive::util::IsUnderDriveMountPoint(directory))
104 directory = download_util::GetDefaultDownloadDirectory(); 104 directory = download_util::GetDefaultDownloadDirectory();
105 #endif 105 #endif
106 106
107 // Ensure the download directory exists. TODO(asargent) - make this use 107 // Ensure the download directory exists. TODO(asargent) - make this use
108 // common code from the downloads system. 108 // common code from the downloads system.
109 if (!file_util::DirectoryExists(directory)) { 109 if (!file_util::DirectoryExists(directory)) {
110 if (!file_util::CreateDirectory(directory)) { 110 if (!file_util::CreateDirectory(directory)) {
111 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 111 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
112 base::Bind(callback, FilePath())); 112 base::Bind(callback, FilePath()));
113 return; 113 return;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 void WebstoreInstaller::ReportSuccess() { 377 void WebstoreInstaller::ReportSuccess() {
378 if (delegate_) { 378 if (delegate_) {
379 delegate_->OnExtensionInstallSuccess(id_); 379 delegate_->OnExtensionInstallSuccess(id_);
380 delegate_ = NULL; 380 delegate_ = NULL;
381 } 381 }
382 382
383 Release(); // Balanced in Start(). 383 Release(); // Balanced in Start().
384 } 384 }
385 385
386 } // namespace extensions 386 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698