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

Unified Diff: google_apis/gaia/oauth2_token_service.h

Issue 2910983003: Replace deprecated base::NonThreadSafe in google_apis/gaia in favor of SequenceChecker. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | google_apis/gaia/oauth2_token_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/oauth2_token_service.h
diff --git a/google_apis/gaia/oauth2_token_service.h b/google_apis/gaia/oauth2_token_service.h
index e0b1cf49a8cfb5531411e92753aa27eabd0c06d8..213058aa712d9e79af51e55f1aa297755eb66251 100644
--- a/google_apis/gaia/oauth2_token_service.h
+++ b/google_apis/gaia/oauth2_token_service.h
@@ -16,7 +16,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
-#include "base/threading/non_thread_safe.h"
+#include "base/sequence_checker.h"
#include "base/time/time.h"
#include "google_apis/gaia/google_service_auth_error.h"
#include "google_apis/gaia/oauth2_access_token_consumer.h"
@@ -53,7 +53,7 @@ class OAuth2TokenServiceDelegate;
//
// The caller of StartRequest() owns the returned request and is responsible to
// delete the request even once the callback has been invoked.
-class OAuth2TokenService : public base::NonThreadSafe {
+class OAuth2TokenService {
public:
// A set of scopes in OAuth2 authentication.
typedef std::set<std::string> ScopeSet;
@@ -221,7 +221,6 @@ class OAuth2TokenService : public base::NonThreadSafe {
// operated on the UI thread.
// TODO(davidroche): move this out of header file.
class RequestImpl : public base::SupportsWeakPtr<RequestImpl>,
- public base::NonThreadSafe,
public Request {
public:
// |consumer| is required to outlive this.
@@ -242,6 +241,8 @@ class OAuth2TokenService : public base::NonThreadSafe {
// |consumer_| to call back when this request completes.
const std::string account_id_;
Consumer* const consumer_;
+
+ SEQUENCE_CHECKER(sequence_checker_);
};
// Implement it in delegates if they want to report errors to the user.
@@ -388,6 +389,8 @@ class OAuth2TokenService : public base::NonThreadSafe {
SameScopesRequestedForDifferentClients);
FRIEND_TEST_ALL_PREFIXES(OAuth2TokenServiceTest, UpdateClearsCache);
+ SEQUENCE_CHECKER(sequence_checker_);
+
DISALLOW_COPY_AND_ASSIGN(OAuth2TokenService);
};
« no previous file with comments | « no previous file | google_apis/gaia/oauth2_token_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698