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

Side by Side Diff: sync/internal_api/public/http_bridge.h

Issue 1866243002: Convert //sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_
6 #define SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
Nicolas Zea 2016/04/07 21:48:58 include memory?
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/synchronization/lock.h" 15 #include "base/synchronization/lock.h"
16 #include "base/synchronization/waitable_event.h" 16 #include "base/synchronization/waitable_event.h"
17 #include "base/timer/timer.h" 17 #include "base/timer/timer.h"
18 #include "net/url_request/url_fetcher_delegate.h" 18 #include "net/url_request/url_fetcher_delegate.h"
19 #include "net/url_request/url_request_context.h" 19 #include "net/url_request/url_request_context.h"
20 #include "net/url_request/url_request_context_getter.h" 20 #include "net/url_request/url_request_context_getter.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // Cached response data. 158 // Cached response data.
159 bool request_completed; 159 bool request_completed;
160 bool request_succeeded; 160 bool request_succeeded;
161 int http_response_code; 161 int http_response_code;
162 int error_code; 162 int error_code;
163 std::string response_content; 163 std::string response_content;
164 scoped_refptr<net::HttpResponseHeaders> response_headers; 164 scoped_refptr<net::HttpResponseHeaders> response_headers;
165 165
166 // Timer to ensure http requests aren't stalled. Reset every time upload or 166 // Timer to ensure http requests aren't stalled. Reset every time upload or
167 // download progress is made. 167 // download progress is made.
168 scoped_ptr<base::Timer> http_request_timeout_timer; 168 std::unique_ptr<base::Timer> http_request_timeout_timer;
169 }; 169 };
170 170
171 // This lock synchronizes use of state involved in the flow to fetch a URL 171 // This lock synchronizes use of state involved in the flow to fetch a URL
172 // using URLFetcher, including |fetch_state_| and |request_context_getter_| on 172 // using URLFetcher, including |fetch_state_| and |request_context_getter_| on
173 // any thread, for example, this flow needs to be synchronized to gracefully 173 // any thread, for example, this flow needs to be synchronized to gracefully
174 // clean up URLFetcher and return appropriate values in |error_code|. 174 // clean up URLFetcher and return appropriate values in |error_code|.
175 mutable base::Lock fetch_state_lock_; 175 mutable base::Lock fetch_state_lock_;
176 URLFetchState fetch_state_; 176 URLFetchState fetch_state_;
177 177
178 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; 178 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // A callback to tag Sync request to be able to record data use of this 226 // A callback to tag Sync request to be able to record data use of this
227 // service by data_use_measurement component. 227 // service by data_use_measurement component.
228 BindToTrackerCallback bind_to_tracker_callback_; 228 BindToTrackerCallback bind_to_tracker_callback_;
229 229
230 DISALLOW_COPY_AND_ASSIGN(HttpBridgeFactory); 230 DISALLOW_COPY_AND_ASSIGN(HttpBridgeFactory);
231 }; 231 };
232 232
233 } // namespace syncer 233 } // namespace syncer
234 234
235 #endif // SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_ 235 #endif // SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698