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

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

Issue 10825093: Fix regression due to deprecated promo preference. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « chrome/browser/web_resource/promo_resource_service.h ('k') | no next file » | 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) 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/web_resource/promo_resource_service.h" 5 #include "chrome/browser/web_resource/promo_resource_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 void PromoResourceService::Unpack(const DictionaryValue& parsed_json) { 180 void PromoResourceService::Unpack(const DictionaryValue& parsed_json) {
181 NotificationPromo notification_promo(profile_); 181 NotificationPromo notification_promo(profile_);
182 notification_promo.InitFromJson(parsed_json); 182 notification_promo.InitFromJson(parsed_json);
183 183
184 if (notification_promo.new_notification()) { 184 if (notification_promo.new_notification()) {
185 ScheduleNotification(notification_promo.StartTimeForGroup(), 185 ScheduleNotification(notification_promo.StartTimeForGroup(),
186 notification_promo.EndTime()); 186 notification_promo.EndTime());
187 } 187 }
188 } 188 }
189
190 bool PromoResourceService::CanShowNotificationPromo(Profile* profile) {
191 NotificationPromo notification_promo(profile);
192 notification_promo.InitFromPrefs();
193 return notification_promo.CanShow();
194 }
OLDNEW
« no previous file with comments | « chrome/browser/web_resource/promo_resource_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698