| OLD | NEW |
| 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_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // Dismissed snippets, only for unit tests. | 143 // Dismissed snippets, only for unit tests. |
| 144 const NTPSnippet::PtrVector& GetDismissedSnippetsForTesting( | 144 const NTPSnippet::PtrVector& GetDismissedSnippetsForTesting( |
| 145 Category category) const { | 145 Category category) const { |
| 146 return category_contents_.find(category)->second.dismissed; | 146 return category_contents_.find(category)->second.dismissed; |
| 147 } | 147 } |
| 148 | 148 |
| 149 private: | 149 private: |
| 150 friend class RemoteSuggestionsProviderTest; | 150 friend class RemoteSuggestionsProviderTest; |
| 151 | 151 |
| 152 FRIEND_TEST_ALL_PREFIXES(RemoteSuggestionsProviderTest, | 152 FRIEND_TEST_ALL_PREFIXES(RemoteSuggestionsProviderTest, |
| 153 DontNotifyIfNotAvailable); |
| 154 FRIEND_TEST_ALL_PREFIXES(RemoteSuggestionsProviderTest, |
| 153 RemoveExpiredDismissedContent); | 155 RemoveExpiredDismissedContent); |
| 154 FRIEND_TEST_ALL_PREFIXES(RemoteSuggestionsProviderTest, | 156 FRIEND_TEST_ALL_PREFIXES(RemoteSuggestionsProviderTest, |
| 155 RescheduleOnStateChange); | 157 RescheduleOnStateChange); |
| 156 FRIEND_TEST_ALL_PREFIXES(RemoteSuggestionsProviderTest, StatusChanges); | 158 FRIEND_TEST_ALL_PREFIXES(RemoteSuggestionsProviderTest, StatusChanges); |
| 157 FRIEND_TEST_ALL_PREFIXES(RemoteSuggestionsProviderTest, | 159 FRIEND_TEST_ALL_PREFIXES(RemoteSuggestionsProviderTest, |
| 158 SuggestionsFetchedOnSignInAndSignOut); | 160 SuggestionsFetchedOnSignInAndSignOut); |
| 159 | 161 |
| 160 // Possible state transitions: | 162 // Possible state transitions: |
| 161 // NOT_INITED --------+ | 163 // NOT_INITED --------+ |
| 162 // / \ | | 164 // / \ | |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 | 394 |
| 393 // Request throttler for limiting requests to thumbnail images. | 395 // Request throttler for limiting requests to thumbnail images. |
| 394 RequestThrottler thumbnail_requests_throttler_; | 396 RequestThrottler thumbnail_requests_throttler_; |
| 395 | 397 |
| 396 DISALLOW_COPY_AND_ASSIGN(RemoteSuggestionsProvider); | 398 DISALLOW_COPY_AND_ASSIGN(RemoteSuggestionsProvider); |
| 397 }; | 399 }; |
| 398 | 400 |
| 399 } // namespace ntp_snippets | 401 } // namespace ntp_snippets |
| 400 | 402 |
| 401 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_H_ | 403 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_REMOTE_SUGGESTIONS_PROVIDER_H_ |
| OLD | NEW |