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

Unified Diff: chrome/browser/extensions/webstore_installer.cc

Issue 294893002: Download webstore CRXs into separate directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/webstore_installer.cc
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
index 25ef1e838135de5053b85cdab684aa7c380a504f..95b961a4376621d4c123c843d138ea85eaa67082 100644
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -135,15 +135,6 @@ void GetDownloadFilePath(
base::Bind(callback, file));
}
-bool UseSeparateWebstoreDownloadDirectory() {
- const char kFieldTrial[] = "WebstoreDownloadDirectory";
- const char kSeparateDirectoryUnderUDD[] = "SeparateDirectoryUnderUDD";
-
- std::string field_trial_group =
- base::FieldTrialList::FindFullName(kFieldTrial);
- return field_trial_group == kSeparateDirectoryUnderUDD;
-}
-
void MaybeAppendAuthUserParameter(const std::string& authuser, GURL* url) {
if (authuser.empty())
return;
@@ -565,15 +556,9 @@ void WebstoreInstaller::DownloadCrx(
download_url_ = GetWebstoreInstallURL(extension_id, source);
MaybeAppendAuthUserParameter(approval_->authuser, &download_url_);
- base::FilePath download_path;
- if (UseSeparateWebstoreDownloadDirectory()) {
- base::FilePath user_data_dir;
- PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
- download_path = user_data_dir.Append(kWebstoreDownloadFolder);
- } else {
- download_path = DownloadPrefs::FromDownloadManager(
- BrowserContext::GetDownloadManager(profile_))->DownloadPath();
- }
+ base::FilePath user_data_dir;
+ PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
+ base::FilePath download_path = user_data_dir.Append(kWebstoreDownloadFolder);
base::FilePath download_directory(g_download_directory_for_tests ?
*g_download_directory_for_tests : download_path);
« 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