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(JoinString(params, '&'), true)); | 220 "&x=" + net::EscapeQueryParamValue(base::JoinString(params, "&"), |
| 221 true)); |
221 DCHECK(url.is_valid()); | 222 DCHECK(url.is_valid()); |
222 | 223 |
223 return url; | 224 return url; |
224 } | 225 } |
225 | 226 |
226 void WebstoreInstaller::Delegate::OnExtensionDownloadStarted( | 227 void WebstoreInstaller::Delegate::OnExtensionDownloadStarted( |
227 const std::string& id, | 228 const std::string& id, |
228 content::DownloadItem* item) { | 229 content::DownloadItem* item) { |
229 } | 230 } |
230 | 231 |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 1, | 783 1, |
783 kMaxSizeKb, | 784 kMaxSizeKb, |
784 kNumBuckets); | 785 kNumBuckets); |
785 } | 786 } |
786 UMA_HISTOGRAM_BOOLEAN( | 787 UMA_HISTOGRAM_BOOLEAN( |
787 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", | 788 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", |
788 total_bytes <= 0); | 789 total_bytes <= 0); |
789 } | 790 } |
790 | 791 |
791 } // namespace extensions | 792 } // namespace extensions |
OLD | NEW |