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

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

Issue 3040014: Merge 53102 - Disallow syncing of extensions with third-party update URLs or ... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/sync/glue/extension_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/glue/extension_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698