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

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

Issue 10532037: Revert r139371 and r138961 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 cmd_line->GetSwitchValueASCII(switches::kAppsGalleryDownloadURL); 73 cmd_line->GetSwitchValueASCII(switches::kAppsGalleryDownloadURL);
74 return GURL(base::StringPrintf(download_url.c_str(), 74 return GURL(base::StringPrintf(download_url.c_str(),
75 extension_id.c_str())); 75 extension_id.c_str()));
76 } 76 }
77 std::vector<std::string> params; 77 std::vector<std::string> params;
78 params.push_back("id=" + extension_id); 78 params.push_back("id=" + extension_id);
79 if (!install_source.empty()) 79 if (!install_source.empty())
80 params.push_back("installsource=" + install_source); 80 params.push_back("installsource=" + install_source);
81 params.push_back("lang=" + g_browser_process->GetApplicationLocale()); 81 params.push_back("lang=" + g_browser_process->GetApplicationLocale());
82 params.push_back("uc"); 82 params.push_back("uc");
83 std::string url_string = extension_urls::GetWebstoreUpdateUrl().spec(); 83 std::string url_string = extension_urls::GetWebstoreUpdateUrl(true).spec();
84 84
85 GURL url(url_string + "?response=redirect&x=" + 85 GURL url(url_string + "?response=redirect&x=" +
86 net::EscapeQueryParamValue(JoinString(params, '&'), true)); 86 net::EscapeQueryParamValue(JoinString(params, '&'), true));
87 DCHECK(url.is_valid()); 87 DCHECK(url.is_valid());
88 88
89 return url; 89 return url;
90 } 90 }
91 91
92 // Must be executed on the FILE thread. 92 // Must be executed on the FILE thread.
93 void GetDownloadFilePath( 93 void GetDownloadFilePath(
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 340
341 void WebstoreInstaller::ReportSuccess() { 341 void WebstoreInstaller::ReportSuccess() {
342 if (delegate_) { 342 if (delegate_) {
343 delegate_->OnExtensionInstallSuccess(id_); 343 delegate_->OnExtensionInstallSuccess(id_);
344 delegate_ = NULL; 344 delegate_ = NULL;
345 } 345 }
346 346
347 Release(); // Balanced in Start(). 347 Release(); // Balanced in Start().
348 } 348 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/updater/extension_updater_unittest.cc ('k') | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698