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

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

Issue 10833057: Re-apply CL's to force store-hosted extension update checks to use SSL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 cmd_line->GetSwitchValueASCII(switches::kAppsGalleryDownloadURL); 75 cmd_line->GetSwitchValueASCII(switches::kAppsGalleryDownloadURL);
76 return GURL(base::StringPrintf(download_url.c_str(), 76 return GURL(base::StringPrintf(download_url.c_str(),
77 extension_id.c_str())); 77 extension_id.c_str()));
78 } 78 }
79 std::vector<std::string> params; 79 std::vector<std::string> params;
80 params.push_back("id=" + extension_id); 80 params.push_back("id=" + extension_id);
81 if (!install_source.empty()) 81 if (!install_source.empty())
82 params.push_back("installsource=" + install_source); 82 params.push_back("installsource=" + install_source);
83 params.push_back("lang=" + g_browser_process->GetApplicationLocale()); 83 params.push_back("lang=" + g_browser_process->GetApplicationLocale());
84 params.push_back("uc"); 84 params.push_back("uc");
85 std::string url_string = extension_urls::GetWebstoreUpdateUrl(true).spec(); 85 std::string url_string = extension_urls::GetWebstoreUpdateUrl().spec();
86 86
87 GURL url(url_string + "?response=redirect&x=" + 87 GURL url(url_string + "?response=redirect&x=" +
88 net::EscapeQueryParamValue(JoinString(params, '&'), true)); 88 net::EscapeQueryParamValue(JoinString(params, '&'), true));
89 DCHECK(url.is_valid()); 89 DCHECK(url.is_valid());
90 90
91 return url; 91 return url;
92 } 92 }
93 93
94 // Must be executed on the FILE thread. 94 // Must be executed on the FILE thread.
95 void GetDownloadFilePath( 95 void GetDownloadFilePath(
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 void WebstoreInstaller::ReportSuccess() { 353 void WebstoreInstaller::ReportSuccess() {
354 if (delegate_) { 354 if (delegate_) {
355 delegate_->OnExtensionInstallSuccess(id_); 355 delegate_->OnExtensionInstallSuccess(id_);
356 delegate_ = NULL; 356 delegate_ = NULL;
357 } 357 }
358 358
359 Release(); // Balanced in Start(). 359 Release(); // Balanced in Start().
360 } 360 }
361 361
362 } // namespace extensions 362 } // namespace extensions
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