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

Side by Side Diff: components/ntp_snippets/ntp_snippets_service.h

Issue 2276383002: Support server-provided category names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 PrefService* pref_service_; 289 PrefService* pref_service_;
290 290
291 suggestions::SuggestionsService* suggestions_service_; 291 suggestions::SuggestionsService* suggestions_service_;
292 292
293 const Category articles_category_; 293 const Category articles_category_;
294 294
295 struct CategoryContent { 295 struct CategoryContent {
296 CategoryStatus status = CategoryStatus::INITIALIZING; 296 CategoryStatus status = CategoryStatus::INITIALIZING;
297 297
298 // For server-side categories, the title of the section, localized to the
299 // running UI language. Ignored for categories known to the client (i.e.
tschumann 2016/08/25 16:46:31 hm... the last sentence is a bit confusing. For ar
sfiera 2016/08/26 09:16:15 Ah, actually, it's a mistake for this comment to b
300 // ARTICLES).
301 base::string16 localized_title;
302
298 // True iff the server returned results in this category in the last fetch. 303 // True iff the server returned results in this category in the last fetch.
299 // We never remove categories that the server still provides, but if the 304 // We never remove categories that the server still provides, but if the
300 // server stops providing a category, we won't yet report it as NOT_PROVIDED 305 // server stops providing a category, we won't yet report it as NOT_PROVIDED
301 // while we still have non-expired snippets in it. 306 // while we still have non-expired snippets in it.
302 bool provided_by_server = true; 307 bool provided_by_server = true;
303 308
304 // All current suggestions (i.e. not dismissed ones). 309 // All current suggestions (i.e. not dismissed ones).
305 NTPSnippet::PtrVector snippets; 310 NTPSnippet::PtrVector snippets;
306 311
307 // Suggestions that the user dismissed. We keep these around until they 312 // Suggestions that the user dismissed. We keep these around until they
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 363
359 // Request throttler for limiting requests to thumbnail images. 364 // Request throttler for limiting requests to thumbnail images.
360 RequestThrottler thumbnail_requests_throttler_; 365 RequestThrottler thumbnail_requests_throttler_;
361 366
362 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); 367 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService);
363 }; 368 };
364 369
365 } // namespace ntp_snippets 370 } // namespace ntp_snippets
366 371
367 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 372 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698