OLD | NEW |
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 <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 std::vector<std::string> params; | 210 std::vector<std::string> params; |
211 params.push_back("id=" + extension_id); | 211 params.push_back("id=" + extension_id); |
212 if (!install_source.empty()) | 212 if (!install_source.empty()) |
213 params.push_back("installsource=" + install_source); | 213 params.push_back("installsource=" + install_source); |
214 params.push_back("uc"); | 214 params.push_back("uc"); |
215 std::string url_string = extension_urls::GetWebstoreUpdateUrl().spec(); | 215 std::string url_string = extension_urls::GetWebstoreUpdateUrl().spec(); |
216 | 216 |
217 GURL url(url_string + "?response=redirect&" + | 217 GURL url(url_string + "?response=redirect&" + |
218 update_client::UpdateQueryParams::Get( | 218 update_client::UpdateQueryParams::Get( |
219 update_client::UpdateQueryParams::CRX) + | 219 update_client::UpdateQueryParams::CRX) + |
220 "&x=" + net::EscapeQueryParamValue(base::JoinString(params, "&"), | 220 "&x=" + net::EscapeQueryParamValue(JoinString(params, '&'), true)); |
221 true)); | |
222 DCHECK(url.is_valid()); | 221 DCHECK(url.is_valid()); |
223 | 222 |
224 return url; | 223 return url; |
225 } | 224 } |
226 | 225 |
227 void WebstoreInstaller::Delegate::OnExtensionDownloadStarted( | 226 void WebstoreInstaller::Delegate::OnExtensionDownloadStarted( |
228 const std::string& id, | 227 const std::string& id, |
229 content::DownloadItem* item) { | 228 content::DownloadItem* item) { |
230 } | 229 } |
231 | 230 |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 1, | 782 1, |
784 kMaxSizeKb, | 783 kMaxSizeKb, |
785 kNumBuckets); | 784 kNumBuckets); |
786 } | 785 } |
787 UMA_HISTOGRAM_BOOLEAN( | 786 UMA_HISTOGRAM_BOOLEAN( |
788 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", | 787 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", |
789 total_bytes <= 0); | 788 total_bytes <= 0); |
790 } | 789 } |
791 | 790 |
792 } // namespace extensions | 791 } // namespace extensions |
OLD | NEW |