| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/extension_updater.h" | 5 #include "chrome/browser/extensions/extension_updater.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 if (id.empty()) { | 228 if (id.empty()) { |
| 229 LOG(WARNING) << "Found extension with empty ID"; | 229 LOG(WARNING) << "Found extension with empty ID"; |
| 230 return; | 230 return; |
| 231 } | 231 } |
| 232 | 232 |
| 233 if (update_url.DomainIs("google.com")) { | 233 if (update_url.DomainIs("google.com")) { |
| 234 url_stats_.google_url_count++; | 234 url_stats_.google_url_count++; |
| 235 } else if (update_url.is_empty()) { | 235 } else if (update_url.is_empty()) { |
| 236 url_stats_.no_url_count++; | 236 url_stats_.no_url_count++; |
| 237 // Fill in default update URL. | 237 // Fill in default update URL. |
| 238 update_url = GURL(extension_urls::kGalleryUpdateURL); | 238 // |
| 239 // TODO(akalin): Figure out if we should use the HTTPS version. |
| 240 update_url = GURL(extension_urls::kGalleryUpdateHttpUrl); |
| 239 } else { | 241 } else { |
| 240 url_stats_.other_url_count++; | 242 url_stats_.other_url_count++; |
| 241 } | 243 } |
| 242 | 244 |
| 243 if (is_theme) { | 245 if (is_theme) { |
| 244 url_stats_.theme_count++; | 246 url_stats_.theme_count++; |
| 245 } | 247 } |
| 246 | 248 |
| 247 DCHECK(!update_url.is_empty()); | 249 DCHECK(!update_url.is_empty()); |
| 248 DCHECK(update_url.is_valid()); | 250 DCHECK(update_url.is_valid()); |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 extension_fetcher_.reset( | 835 extension_fetcher_.reset( |
| 834 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); | 836 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); |
| 835 extension_fetcher_->set_request_context( | 837 extension_fetcher_->set_request_context( |
| 836 Profile::GetDefaultRequestContext()); | 838 Profile::GetDefaultRequestContext()); |
| 837 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | | 839 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | |
| 838 net::LOAD_DO_NOT_SAVE_COOKIES); | 840 net::LOAD_DO_NOT_SAVE_COOKIES); |
| 839 extension_fetcher_->Start(); | 841 extension_fetcher_->Start(); |
| 840 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); | 842 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); |
| 841 } | 843 } |
| 842 } | 844 } |
| OLD | NEW |