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

Side by Side Diff: chrome/browser/web_resource/promo_resource_service.cc

Issue 7108035: Revert 88400 (Probable breaker of XP Tests(dbg)(5), 10.6 Tests (dbg)(2), 10.5 Tests (dbg)(2)) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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/web_resource/promo_resource_service.h" 5 #include "chrome/browser/web_resource/promo_resource_service.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 case platform_util::CHANNEL_BETA: 105 case platform_util::CHANNEL_BETA:
106 return (BETA_BUILD & builds_allowed) != 0; 106 return (BETA_BUILD & builds_allowed) != 0;
107 case platform_util::CHANNEL_STABLE: 107 case platform_util::CHANNEL_STABLE:
108 return (STABLE_BUILD & builds_allowed) != 0; 108 return (STABLE_BUILD & builds_allowed) != 0;
109 default: 109 default:
110 return false; 110 return false;
111 } 111 }
112 } 112 }
113 113
114 PromoResourceService::PromoResourceService(Profile* profile) 114 PromoResourceService::PromoResourceService(Profile* profile)
115 : WebResourceService(profile->GetPrefs(), 115 : WebResourceService(profile,
116 profile->GetPrefs(),
116 PromoResourceService::kDefaultPromoResourceServer, 117 PromoResourceService::kDefaultPromoResourceServer,
117 true, // append locale to URL 118 true, // append locale to URL
118 NotificationType::PROMO_RESOURCE_STATE_CHANGED, 119 NotificationType::PROMO_RESOURCE_STATE_CHANGED,
119 prefs::kNTPPromoResourceCacheUpdate, 120 prefs::kNTPPromoResourceCacheUpdate,
120 kStartResourceFetchDelay, 121 kStartResourceFetchDelay,
121 kCacheUpdateDelay), 122 kCacheUpdateDelay),
122 web_resource_cache_(NULL), 123 web_resource_cache_(NULL),
123 channel_(platform_util::CHANNEL_UNKNOWN) { 124 channel_(platform_util::CHANNEL_UNKNOWN) {
124 Init(); 125 Init();
125 } 126 }
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 base::ThreadRestrictions::ScopedAllowIO allow_io; 477 base::ThreadRestrictions::ScopedAllowIO allow_io;
477 platform_util::Channel channel = platform_util::GetChannel(); 478 platform_util::Channel channel = platform_util::GetChannel();
478 is_promo_build = PromoResourceService::IsBuildTargeted( 479 is_promo_build = PromoResourceService::IsBuildTargeted(
479 channel, prefs->GetInteger(prefs::kNTPPromoBuild)); 480 channel, prefs->GetInteger(prefs::kNTPPromoBuild));
480 } 481 }
481 482
482 return !promo_closed && !is_synced && is_promo_build; 483 return !promo_closed && !is_synced && is_promo_build;
483 } 484 }
484 485
485 } // namespace PromoResourceServiceUtil 486 } // namespace PromoResourceServiceUtil
OLDNEW
« no previous file with comments | « chrome/browser/web_resource/promo_resource_service.h ('k') | chrome/browser/web_resource/web_resource_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698