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

Side by Side Diff: components/sync/engine_impl/attachments/attachment_uploader_impl.h

Issue 2915453002: Deprecate NonThreadSafe in components/sync in favor of SequenceChecker. (Closed)
Patch Set: fix comment Created 3 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SYNC_ENGINE_IMPL_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_
6 #define COMPONENTS_SYNC_ENGINE_IMPL_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_ 6 #define COMPONENTS_SYNC_ENGINE_IMPL_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <unordered_map> 12 #include <unordered_map>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/threading/non_thread_safe.h" 15 #include "base/sequence_checker.h"
16 #include "components/sync/base/model_type.h" 16 #include "components/sync/base/model_type.h"
17 #include "components/sync/engine/attachments/attachment_uploader.h" 17 #include "components/sync/engine/attachments/attachment_uploader.h"
18 #include "google_apis/gaia/oauth2_token_service_request.h" 18 #include "google_apis/gaia/oauth2_token_service_request.h"
19 #include "net/url_request/url_request_context_getter.h" 19 #include "net/url_request/url_request_context_getter.h"
20 20
21 class GURL; 21 class GURL;
22 22
23 namespace net { 23 namespace net {
24 class URLRequestContextGetter; 24 class URLRequestContextGetter;
25 } // namespace net 25 } // namespace net
26 26
27 namespace syncer { 27 namespace syncer {
28 28
29 // An implementation of AttachmentUploader. 29 // An implementation of AttachmentUploader.
30 class AttachmentUploaderImpl : public AttachmentUploader, 30 class AttachmentUploaderImpl : public AttachmentUploader {
31 public base::NonThreadSafe {
32 public: 31 public:
33 // |sync_service_url| is the URL of the sync service. 32 // |sync_service_url| is the URL of the sync service.
34 // 33 //
35 // |url_request_context_getter| provides a URLRequestContext. 34 // |url_request_context_getter| provides a URLRequestContext.
36 // 35 //
37 // |account_id| is the account id to use for uploads. 36 // |account_id| is the account id to use for uploads.
38 // 37 //
39 // |scopes| is the set of scopes to use for uploads. 38 // |scopes| is the set of scopes to use for uploads.
40 // 39 //
41 // |token_service_provider| provides an OAuth2 token service. 40 // |token_service_provider| provides an OAuth2 token service.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 GURL sync_service_url_; 88 GURL sync_service_url_;
90 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; 89 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
91 std::string account_id_; 90 std::string account_id_;
92 OAuth2TokenService::ScopeSet scopes_; 91 OAuth2TokenService::ScopeSet scopes_;
93 scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider> 92 scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>
94 token_service_provider_; 93 token_service_provider_;
95 std::string raw_store_birthday_; 94 std::string raw_store_birthday_;
96 StateMap state_map_; 95 StateMap state_map_;
97 ModelType model_type_; 96 ModelType model_type_;
98 97
98 SEQUENCE_CHECKER(sequence_checker_);
99
99 // Must be last data member. 100 // Must be last data member.
100 base::WeakPtrFactory<AttachmentUploaderImpl> weak_ptr_factory_; 101 base::WeakPtrFactory<AttachmentUploaderImpl> weak_ptr_factory_;
101 102
102 DISALLOW_COPY_AND_ASSIGN(AttachmentUploaderImpl); 103 DISALLOW_COPY_AND_ASSIGN(AttachmentUploaderImpl);
103 }; 104 };
104 105
105 } // namespace syncer 106 } // namespace syncer
106 107
107 #endif // COMPONENTS_SYNC_ENGINE_IMPL_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_ 108 #endif // COMPONENTS_SYNC_ENGINE_IMPL_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698