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

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

Issue 2319553005: Remove NTPSnippetsService::disabled_reason(). (Closed)
Patch Set: x 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
« no previous file with comments | « no previous file | components/ntp_snippets/ntp_snippets_status_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // suggestions from the suggestion service) and adds them to the current ones. 114 // suggestions from the suggestion service) and adds them to the current ones.
115 // Only called from chrome://snippets-internals, DO NOT USE otherwise! 115 // Only called from chrome://snippets-internals, DO NOT USE otherwise!
116 // Ignored while |loaded()| is false. 116 // Ignored while |loaded()| is false.
117 void FetchSnippetsFromHosts(const std::set<std::string>& hosts, 117 void FetchSnippetsFromHosts(const std::set<std::string>& hosts,
118 bool interactive_request); 118 bool interactive_request);
119 119
120 const NTPSnippetsFetcher* snippets_fetcher() const { 120 const NTPSnippetsFetcher* snippets_fetcher() const {
121 return snippets_fetcher_.get(); 121 return snippets_fetcher_.get();
122 } 122 }
123 123
124 // Returns a reason why the service is disabled, or DisabledReason::NONE
125 // if it's not.
126 DisabledReason disabled_reason() const {
127 return snippets_status_service_->disabled_reason();
128 }
129
130 // (Re)schedules the periodic fetching of snippets. This is necessary because 124 // (Re)schedules the periodic fetching of snippets. This is necessary because
131 // the schedule depends on the time of day. 125 // the schedule depends on the time of day.
132 void RescheduleFetching(); 126 void RescheduleFetching();
133 127
134 // ContentSuggestionsProvider implementation 128 // ContentSuggestionsProvider implementation
135 CategoryStatus GetCategoryStatus(Category category) override; 129 CategoryStatus GetCategoryStatus(Category category) override;
136 CategoryInfo GetCategoryInfo(Category category) override; 130 CategoryInfo GetCategoryInfo(Category category) override;
137 void DismissSuggestion(const std::string& suggestion_id) override; 131 void DismissSuggestion(const std::string& suggestion_id) override;
138 void FetchSuggestionImage(const std::string& suggestion_id, 132 void FetchSuggestionImage(const std::string& suggestion_id,
139 const ImageFetchedCallback& callback) override; 133 const ImageFetchedCallback& callback) override;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 345
352 // Request throttler for limiting requests to thumbnail images. 346 // Request throttler for limiting requests to thumbnail images.
353 RequestThrottler thumbnail_requests_throttler_; 347 RequestThrottler thumbnail_requests_throttler_;
354 348
355 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); 349 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService);
356 }; 350 };
357 351
358 } // namespace ntp_snippets 352 } // namespace ntp_snippets
359 353
360 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ 354 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | components/ntp_snippets/ntp_snippets_status_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698