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

Unified Diff: chrome/service/cloud_print/cloud_print_token_store.h

Issue 2914573002: Replace deprecated base::NonThreadSafe in chrome/service 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
Index: chrome/service/cloud_print/cloud_print_token_store.h
diff --git a/chrome/service/cloud_print/cloud_print_token_store.h b/chrome/service/cloud_print/cloud_print_token_store.h
index 767619b51e7f722a6e1b81d14aa58f3a35389c3b..b61ed9eeb83947a0f0daa0d7a46a45340c44a335 100644
--- a/chrome/service/cloud_print/cloud_print_token_store.h
+++ b/chrome/service/cloud_print/cloud_print_token_store.h
@@ -8,14 +8,14 @@
#include <string>
#include "base/logging.h"
#include "base/macros.h"
-#include "base/threading/non_thread_safe.h"
+#include "base/sequence_checker.h"
// This class serves as the single repository for cloud print auth tokens. This
// is only used within the CloudPrintProxyCoreThread.
namespace cloud_print {
-class CloudPrintTokenStore : public base::NonThreadSafe {
+class CloudPrintTokenStore {
public:
// Returns the CloudPrintTokenStore instance for this thread. Will be NULL
// if no instance was created in this thread before.
@@ -26,13 +26,15 @@ class CloudPrintTokenStore : public base::NonThreadSafe {
void SetToken(const std::string& token);
std::string token() const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return token_;
}
private:
std::string token_;
+ SEQUENCE_CHECKER(sequence_checker_);
+
DISALLOW_COPY_AND_ASSIGN(CloudPrintTokenStore);
};
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy.cc ('k') | chrome/service/cloud_print/cloud_print_token_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698