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

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

Issue 2239653002: Add robustness against OAuth2 Token requests getting canceled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Marc's comments Created 4 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
« no previous file with comments | « no previous file | components/ntp_snippets/ntp_snippets_fetcher.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_FETCHER_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_FETCHER_H_
6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_FETCHER_H_ 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_FETCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 Personalization personalization_; 223 Personalization personalization_;
224 // Should we apply host restriction? It is loaded from variation parameters. 224 // Should we apply host restriction? It is loaded from variation parameters.
225 bool use_host_restriction_; 225 bool use_host_restriction_;
226 226
227 // Allow for an injectable tick clock for testing. 227 // Allow for an injectable tick clock for testing.
228 std::unique_ptr<base::TickClock> tick_clock_; 228 std::unique_ptr<base::TickClock> tick_clock_;
229 229
230 // Request throttler for limiting requests. 230 // Request throttler for limiting requests.
231 RequestThrottler request_throttler_; 231 RequestThrottler request_throttler_;
232 232
233 // When a token request gets canceled, we want to retry for _one_ time.
Marc Treib 2016/08/11 10:11:03 nit: s/for one time/once/
jkrcal 2016/08/11 12:31:48 Done.
234 bool oauth_token_retried_;
235
233 base::WeakPtrFactory<NTPSnippetsFetcher> weak_ptr_factory_; 236 base::WeakPtrFactory<NTPSnippetsFetcher> weak_ptr_factory_;
234 237
235 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsFetcher); 238 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsFetcher);
236 }; 239 };
237 } // namespace ntp_snippets 240 } // namespace ntp_snippets
238 241
239 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_FETCHER_H_ 242 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_FETCHER_H_
OLDNEW
« no previous file with comments | « no previous file | components/ntp_snippets/ntp_snippets_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698