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

Side by Side Diff: sync/internal_api/http_bridge.cc

Issue 511173002: Manual fixups for scoped_refptr operator T* removal in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | sync/internal_api/http_bridge_network_resources.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "sync/internal_api/public/http_bridge.h" 5 #include "sync/internal_api/public/http_bridge.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "net/base/load_flags.h" 9 #include "net/base/load_flags.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 return context_.get(); 50 return context_.get();
51 } 51 }
52 52
53 scoped_refptr<base::SingleThreadTaskRunner> 53 scoped_refptr<base::SingleThreadTaskRunner>
54 HttpBridge::RequestContextGetter::GetNetworkTaskRunner() const { 54 HttpBridge::RequestContextGetter::GetNetworkTaskRunner() const {
55 return network_task_runner_; 55 return network_task_runner_;
56 } 56 }
57 57
58 HttpBridgeFactory::HttpBridgeFactory( 58 HttpBridgeFactory::HttpBridgeFactory(
59 net::URLRequestContextGetter* baseline_context_getter, 59 const scoped_refptr<net::URLRequestContextGetter>& baseline_context_getter,
60 const NetworkTimeUpdateCallback& network_time_update_callback, 60 const NetworkTimeUpdateCallback& network_time_update_callback,
61 CancelationSignal* cancelation_signal) 61 CancelationSignal* cancelation_signal)
62 : baseline_request_context_getter_(baseline_context_getter), 62 : baseline_request_context_getter_(baseline_context_getter),
63 network_time_update_callback_(network_time_update_callback), 63 network_time_update_callback_(network_time_update_callback),
64 cancelation_signal_(cancelation_signal) { 64 cancelation_signal_(cancelation_signal) {
65 // Registration should never fail. This should happen on the UI thread during 65 // Registration should never fail. This should happen on the UI thread during
66 // init. It would be impossible for a shutdown to have been requested at this 66 // init. It would be impossible for a shutdown to have been requested at this
67 // point. 67 // point.
68 bool result = cancelation_signal_->TryRegisterHandler(this); 68 bool result = cancelation_signal_->TryRegisterHandler(this);
69 DCHECK(result); 69 DCHECK(result);
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 int64 sane_time_ms = 0; 395 int64 sane_time_ms = 0;
396 if (base::StringToInt64(sane_time_str, &sane_time_ms)) { 396 if (base::StringToInt64(sane_time_str, &sane_time_ms)) {
397 network_time_update_callback_.Run( 397 network_time_update_callback_.Run(
398 base::Time::FromJsTime(sane_time_ms), 398 base::Time::FromJsTime(sane_time_ms),
399 base::TimeDelta::FromMilliseconds(1), 399 base::TimeDelta::FromMilliseconds(1),
400 fetch_state_.end_time - fetch_state_.start_time); 400 fetch_state_.end_time - fetch_state_.start_time);
401 } 401 }
402 } 402 }
403 403
404 } // namespace syncer 404 } // namespace syncer
OLDNEW
« no previous file with comments | « no previous file | sync/internal_api/http_bridge_network_resources.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698