Commit f018e015 authored by jackhou@chromium.org's avatar jackhou@chromium.org

Download webstore CRXs into separate directory.

This permanently enables the experiment that was added in:
https://codereview.chromium.org/46583007

BUG=313992

Review URL: https://codereview.chromium.org/294893002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271654 0039d316-1c4b-4281-b951-d872f2087c98
parent 0a72febb
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment