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

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

Issue 10412050: Change most content::URLFetcher references to net::URLFetcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ChromeOS, address comments Created 8 years, 7 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/apps_promo.h" 5 #include "chrome/browser/extensions/apps_promo.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 AppsPromo::SetSourcePromoLogoURL(GURL()); 351 AppsPromo::SetSourcePromoLogoURL(GURL());
352 } 352 }
353 353
354 SavePromo(); 354 SavePromo();
355 } 355 }
356 356
357 void AppsPromoLogoFetcher::FetchLogo() { 357 void AppsPromoLogoFetcher::FetchLogo() {
358 CHECK(promo_data_.logo.scheme() == chrome::kHttpsScheme); 358 CHECK(promo_data_.logo.scheme() == chrome::kHttpsScheme);
359 359
360 url_fetcher_.reset(content::URLFetcher::Create( 360 url_fetcher_.reset(content::URLFetcher::Create(
361 0, promo_data_.logo, content::URLFetcher::GET, this)); 361 0, promo_data_.logo, net::URLFetcher::GET, this));
362 url_fetcher_->SetRequestContext( 362 url_fetcher_->SetRequestContext(
363 g_browser_process->system_request_context()); 363 g_browser_process->system_request_context());
364 url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | 364 url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
365 net::LOAD_DO_NOT_SAVE_COOKIES); 365 net::LOAD_DO_NOT_SAVE_COOKIES);
366 url_fetcher_->Start(); 366 url_fetcher_->Start();
367 } 367 }
368 368
369 bool AppsPromoLogoFetcher::HaveCachedLogo() { 369 bool AppsPromoLogoFetcher::HaveCachedLogo() {
370 return promo_data_.logo == AppsPromo::GetSourcePromoLogoURL(); 370 return promo_data_.logo == AppsPromo::GetSourcePromoLogoURL();
371 } 371 }
372 372
373 void AppsPromoLogoFetcher::SavePromo() { 373 void AppsPromoLogoFetcher::SavePromo() {
374 AppsPromo::SetPromo(promo_data_); 374 AppsPromo::SetPromo(promo_data_);
375 375
376 content::NotificationService::current()->Notify( 376 content::NotificationService::current()->Notify(
377 chrome::NOTIFICATION_WEB_STORE_PROMO_LOADED, 377 chrome::NOTIFICATION_WEB_STORE_PROMO_LOADED,
378 content::Source<Profile>(profile_), 378 content::Source<Profile>(profile_),
379 content::NotificationService::NoDetails()); 379 content::NotificationService::NoDetails());
380 } 380 }
381 381
382 bool AppsPromoLogoFetcher::SupportsLogoURL() { 382 bool AppsPromoLogoFetcher::SupportsLogoURL() {
383 URLPattern allowed_urls(URLPattern::SCHEME_HTTPS, kValidLogoPattern); 383 URLPattern allowed_urls(URLPattern::SCHEME_HTTPS, kValidLogoPattern);
384 return allowed_urls.MatchesURL(promo_data_.logo); 384 return allowed_urls.MatchesURL(promo_data_.logo);
385 } 385 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_notify_channel_setup.cc ('k') | chrome/browser/extensions/updater/extension_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698