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

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

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 #include "components/sync/engine_impl/attachments/attachment_uploader_impl.h" 5 #include "components/sync/engine_impl/attachments/attachment_uploader_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void OnURLFetchComplete(const net::URLFetcher* source) override; 85 void OnURLFetchComplete(const net::URLFetcher* source) override;
86 86
87 // OAuth2TokenService::Consumer. 87 // OAuth2TokenService::Consumer.
88 void OnGetTokenSuccess(const OAuth2TokenService::Request* request, 88 void OnGetTokenSuccess(const OAuth2TokenService::Request* request,
89 const std::string& access_token, 89 const std::string& access_token,
90 const base::Time& expiration_time) override; 90 const base::Time& expiration_time) override;
91 void OnGetTokenFailure(const OAuth2TokenService::Request* request, 91 void OnGetTokenFailure(const OAuth2TokenService::Request* request,
92 const GoogleServiceAuthError& error) override; 92 const GoogleServiceAuthError& error) override;
93 93
94 private: 94 private:
95 typedef std::vector<UploadCallback> UploadCallbackList; 95 using UploadCallbackList = std::vector<UploadCallback>;
96 96
97 void GetToken(); 97 void GetToken();
98 98
99 void StopAndReportResult(const UploadResult& result, 99 void StopAndReportResult(const UploadResult& result,
100 const AttachmentId& attachment_id); 100 const AttachmentId& attachment_id);
101 101
102 bool is_stopped_; 102 bool is_stopped_;
103 GURL upload_url_; 103 GURL upload_url_;
104 const scoped_refptr<net::URLRequestContextGetter>& 104 const scoped_refptr<net::URLRequestContextGetter>&
105 url_request_context_getter_; 105 url_request_context_getter_;
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 "%s: %s", kSyncStoreBirthday, encoded_store_birthday.c_str())); 391 "%s: %s", kSyncStoreBirthday, encoded_store_birthday.c_str()));
392 392
393 // Use field number to pass ModelType because it's stable and we have server 393 // Use field number to pass ModelType because it's stable and we have server
394 // code to decode it. 394 // code to decode it.
395 const int field_number = GetSpecificsFieldNumberFromModelType(model_type); 395 const int field_number = GetSpecificsFieldNumberFromModelType(model_type);
396 fetcher->AddExtraRequestHeader( 396 fetcher->AddExtraRequestHeader(
397 base::StringPrintf("%s: %d", kSyncDataTypeId, field_number)); 397 base::StringPrintf("%s: %d", kSyncDataTypeId, field_number));
398 } 398 }
399 399
400 } // namespace syncer 400 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine_impl/attachments/attachment_uploader_impl.h ('k') | components/sync/engine_impl/commit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698