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

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

Issue 2689773002: [Sync] Replace typedef with using. (Closed)
Patch Set: [Sync] Replace typedef with using. Created 3 years, 10 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>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // downloads. 74 // downloads.
75 static void ConfigureURLFetcherCommon( 75 static void ConfigureURLFetcherCommon(
76 net::URLFetcher* fetcher, 76 net::URLFetcher* fetcher,
77 const std::string& auth_token, 77 const std::string& auth_token,
78 const std::string& raw_store_birthday, 78 const std::string& raw_store_birthday,
79 ModelType model_type, 79 ModelType model_type,
80 net::URLRequestContextGetter* request_context_getter); 80 net::URLRequestContextGetter* request_context_getter);
81 81
82 private: 82 private:
83 class UploadState; 83 class UploadState;
84 typedef std::string UniqueId; 84 using UniqueId = std::string;
85 typedef std::unordered_map<UniqueId, std::unique_ptr<UploadState>> StateMap; 85 using StateMap = std::unordered_map<UniqueId, std::unique_ptr<UploadState>>;
86 86
87 void OnUploadStateStopped(const UniqueId& unique_id); 87 void OnUploadStateStopped(const UniqueId& unique_id);
88 88
89 GURL sync_service_url_; 89 GURL sync_service_url_;
90 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; 90 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
91 std::string account_id_; 91 std::string account_id_;
92 OAuth2TokenService::ScopeSet scopes_; 92 OAuth2TokenService::ScopeSet scopes_;
93 scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider> 93 scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>
94 token_service_provider_; 94 token_service_provider_;
95 std::string raw_store_birthday_; 95 std::string raw_store_birthday_;
96 StateMap state_map_; 96 StateMap state_map_;
97 ModelType model_type_; 97 ModelType model_type_;
98 98
99 // Must be last data member. 99 // Must be last data member.
100 base::WeakPtrFactory<AttachmentUploaderImpl> weak_ptr_factory_; 100 base::WeakPtrFactory<AttachmentUploaderImpl> weak_ptr_factory_;
101 101
102 DISALLOW_COPY_AND_ASSIGN(AttachmentUploaderImpl); 102 DISALLOW_COPY_AND_ASSIGN(AttachmentUploaderImpl);
103 }; 103 };
104 104
105 } // namespace syncer 105 } // namespace syncer
106 106
107 #endif // COMPONENTS_SYNC_ENGINE_IMPL_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_ 107 #endif // COMPONENTS_SYNC_ENGINE_IMPL_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698