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

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

Issue 8373021: Convert URLFetcher::Delegates to use an interface in content/public/common. Also remove the old U... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
11 #include "chrome/browser/prefs/pref_service.h" 11 #include "chrome/browser/prefs/pref_service.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/webui/ntp/shown_sections_handler.h" 13 #include "chrome/browser/ui/webui/ntp/shown_sections_handler.h"
14 #include "chrome/common/chrome_switches.h" 14 #include "chrome/common/chrome_switches.h"
15 #include "chrome/common/extensions/extension.h" 15 #include "chrome/common/extensions/extension.h"
16 #include "chrome/common/chrome_notification_types.h" 16 #include "chrome/common/chrome_notification_types.h"
17 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
18 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
19 #include "content/public/common/url_constants.h" 19 #include "content/public/common/url_constants.h"
20 #include "content/common/net/url_fetcher.h"
20 #include "net/base/load_flags.h" 21 #include "net/base/load_flags.h"
21 #include "net/url_request/url_request_status.h" 22 #include "net/url_request/url_request_status.h"
22 23
23 const int AppsPromo::kDefaultAppsCounterMax = 10; 24 const int AppsPromo::kDefaultAppsCounterMax = 10;
24 25
25 namespace { 26 namespace {
26 27
27 // The default logo for the promo. 28 // The default logo for the promo.
28 const char kDefaultLogo[] = "chrome://theme/IDR_WEBSTORE_ICON"; 29 const char kDefaultLogo[] = "chrome://theme/IDR_WEBSTORE_ICON";
29 30
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 content::NotificationService::current()->Notify( 392 content::NotificationService::current()->Notify(
392 chrome::NOTIFICATION_WEB_STORE_PROMO_LOADED, 393 chrome::NOTIFICATION_WEB_STORE_PROMO_LOADED,
393 content::Source<Profile>(profile_), 394 content::Source<Profile>(profile_),
394 content::NotificationService::NoDetails()); 395 content::NotificationService::NoDetails());
395 } 396 }
396 397
397 bool AppsPromoLogoFetcher::SupportsLogoURL() { 398 bool AppsPromoLogoFetcher::SupportsLogoURL() {
398 URLPattern allowed_urls(URLPattern::SCHEME_HTTPS, kValidLogoPattern); 399 URLPattern allowed_urls(URLPattern::SCHEME_HTTPS, kValidLogoPattern);
399 return allowed_urls.MatchesURL(promo_data_.logo); 400 return allowed_urls.MatchesURL(promo_data_.logo);
400 } 401 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698