Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_ | 6 #define CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 // promotional line is given by the "inproduct" line. | 139 // promotional line is given by the "inproduct" line. |
| 140 // For "promo_start", the promotional line itself is given in the "tooltip" | 140 // For "promo_start", the promotional line itself is given in the "tooltip" |
| 141 // field. The "question" field gives the type of builds that should be shown | 141 // field. The "question" field gives the type of builds that should be shown |
| 142 // this promo (see the BuildType enum in web_resource_service.cc), the | 142 // this promo (see the BuildType enum in web_resource_service.cc), the |
| 143 // number of hours that each promo group should see it, the maximum promo | 143 // number of hours that each promo group should see it, the maximum promo |
| 144 // group that should see it, the maximum number of views of the promo, and | 144 // group that should see it, the maximum number of views of the promo, and |
| 145 // the platforms that this promo is suitable for, separated by ":". | 145 // the platforms that this promo is suitable for, separated by ":". |
| 146 // For example, "7:24:5:10:7" would indicate that all groups with ids less | 146 // For example, "7:24:5:10:7" would indicate that all groups with ids less |
| 147 // than 5, and with dev, beta and stable builds on Windows, Mac and Linux, | 147 // than 5, and with dev, beta and stable builds on Windows, Mac and Linux, |
| 148 // should see the promo a maximum of 10 times. The groups ramp up so one | 148 // should see the promo a maximum of 10 times. The groups ramp up so one |
| 149 // additional group sees the promo every 24 hours. | 149 // additional group sees the promo every 24 hours. |
|
achuithb
2011/11/27 07:48:26
Fix this comment please.
Cait (Slow)
2011/11/28 19:06:25
Done.
| |
| 150 // | 150 // |
| 151 void UnpackNotificationSignal(const base::DictionaryValue& parsed_json); | 151 void UnpackNotificationSignal(const base::DictionaryValue& parsed_json); |
| 152 | 152 |
| 153 // Unpack the promo resource as a custom logo signal. Expects a start and end | 153 // Unpack the promo resource as a custom logo signal. Expects a start and end |
| 154 // signal. Delivery will be in json in the form of: | 154 // signal. Delivery will be in json in the form of: |
| 155 // { | 155 // { |
| 156 // "topic": { | 156 // "topic": { |
| 157 // "answers": [ | 157 // "answers": [ |
| 158 // { | 158 // { |
| 159 // "answer_id": "107366", | 159 // "answer_id": "107366", |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 220 // "name": "sign_in_promo", | 220 // "name": "sign_in_promo", |
| 221 // "question": "1:5" | 221 // "question": "1:5" |
| 222 // } | 222 // } |
| 223 // ] | 223 // ] |
| 224 // } | 224 // } |
| 225 // } | 225 // } |
| 226 // The question is in the form of "<build>:<group_max>". | 226 // The question is in the form of "<build>:<group_max>". |
| 227 void UnpackNTPSignInPromoSignal(const base::DictionaryValue& parsed_json); | 227 void UnpackNTPSignInPromoSignal(const base::DictionaryValue& parsed_json); |
| 228 | 228 |
| 229 // NotificationPromo::Delegate override. | 229 // NotificationPromo::Delegate override. |
| 230 virtual void OnNewNotification(double start, double end) OVERRIDE; | 230 virtual void OnNotificationParsed(double start, double end) OVERRIDE; |
| 231 | 231 |
| 232 // The profile this service belongs to. | 232 // The profile this service belongs to. |
| 233 Profile* profile_; | 233 Profile* profile_; |
| 234 | 234 |
| 235 // Overrides the current Chrome release channel for testing purposes. | 235 // Overrides the current Chrome release channel for testing purposes. |
| 236 chrome::VersionInfo::Channel channel_; | 236 chrome::VersionInfo::Channel channel_; |
| 237 | 237 |
| 238 // A helper that downloads the promo logo. | 238 // A helper that downloads the promo logo. |
| 239 scoped_ptr<AppsPromoLogoFetcher> apps_promo_logo_fetcher_; | 239 scoped_ptr<AppsPromoLogoFetcher> apps_promo_logo_fetcher_; |
| 240 | 240 |
| 241 DISALLOW_COPY_AND_ASSIGN(PromoResourceService); | 241 DISALLOW_COPY_AND_ASSIGN(PromoResourceService); |
| 242 }; | 242 }; |
| 243 | 243 |
| 244 #endif // CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_ | 244 #endif // CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_ |
| OLD | NEW |