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

Side by Side Diff: chrome/browser/chromeos/arc/arc_auth_context.h

Issue 2887093003: arc: Implement retry logic for transient errors (Closed)
Patch Set: Created 3 years, 7 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 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 CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_CONTEXT_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_CONTEXT_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_CONTEXT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 // GaiaAuthConsumer: 59 // GaiaAuthConsumer:
60 void OnMergeSessionSuccess(const std::string& data) override; 60 void OnMergeSessionSuccess(const std::string& data) override;
61 void OnMergeSessionFailure(const GoogleServiceAuthError& error) override; 61 void OnMergeSessionFailure(const GoogleServiceAuthError& error) override;
62 62
63 private: 63 private:
64 void OnRefreshTokenTimeout(); 64 void OnRefreshTokenTimeout();
65 65
66 void StartFetchers(); 66 void StartFetchers();
67 void ResetFetchers(); 67 void ResetFetchers();
68 void OnFetchersError(const GoogleServiceAuthError& error);
Luis Héctor Chávez 2017/05/17 21:29:24 nit: OnFetcherError
khmel 2017/05/17 21:37:20 Done.
68 69
69 // Unowned pointer. 70 // Unowned pointer.
70 ProfileOAuth2TokenService* token_service_; 71 ProfileOAuth2TokenService* token_service_;
71 std::string account_id_; 72 std::string account_id_;
72 std::string full_account_id_; 73 std::string full_account_id_;
73 74
74 // Owned by content::BrowserContent. Used to isolate cookies for auth server 75 // Owned by content::BrowserContent. Used to isolate cookies for auth server
75 // communication and shared with ARC OptIn UI platform app. 76 // communication and shared with ARC OptIn UI platform app.
76 content::StoragePartition* storage_partition_ = nullptr; 77 content::StoragePartition* storage_partition_ = nullptr;
77 78
78 PrepareCallback callback_; 79 PrepareCallback callback_;
79 bool context_prepared_ = false; 80 bool context_prepared_ = false;
80 81
82 // Contains number of retry attempts to prepare context. 0 means no retry
83 // has occurred.
84 int retry_attempt_count_ = 0;
85
81 base::OneShotTimer refresh_token_timeout_; 86 base::OneShotTimer refresh_token_timeout_;
87 base::OneShotTimer retry_timeout_;
82 std::unique_ptr<GaiaAuthFetcher> merger_fetcher_; 88 std::unique_ptr<GaiaAuthFetcher> merger_fetcher_;
83 std::unique_ptr<UbertokenFetcher> ubertoken_fetcher_; 89 std::unique_ptr<UbertokenFetcher> ubertoken_fetcher_;
84 90
85 DISALLOW_COPY_AND_ASSIGN(ArcAuthContext); 91 DISALLOW_COPY_AND_ASSIGN(ArcAuthContext);
86 }; 92 };
87 93
88 } // namespace arc 94 } // namespace arc
89 95
90 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_CONTEXT_H_ 96 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_AUTH_CONTEXT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_auth_context.cc » ('j') | chrome/browser/chromeos/arc/arc_auth_context.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698