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

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: rebase 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 void WebstoreInstaller::ReportSuccess() { 378 void WebstoreInstaller::ReportSuccess() {
379 if (delegate_) { 379 if (delegate_) {
380 delegate_->OnExtensionInstallSuccess(id_); 380 delegate_->OnExtensionInstallSuccess(id_);
381 delegate_ = NULL; 381 delegate_ = NULL;
382 } 382 }
383 383
384 Release(); // Balanced in Start(). 384 Release(); // Balanced in Start().
385 } 385 }
386 386
387 } // namespace extensions 387 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/download/save_package_file_picker_chromeos.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698