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

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

Issue 10699044: [Sync] Move sync/{internal_api,syncable} into syncer namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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.h" 7 #include "base/message_loop.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "net/base/host_resolver.h" 10 #include "net/base/host_resolver.h"
11 #include "net/base/load_flags.h" 11 #include "net/base/load_flags.h"
12 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
13 #include "net/cookies/cookie_monster.h" 13 #include "net/cookies/cookie_monster.h"
14 #include "net/http/http_cache.h" 14 #include "net/http/http_cache.h"
15 #include "net/http/http_network_layer.h" 15 #include "net/http/http_network_layer.h"
16 #include "net/http/http_response_headers.h" 16 #include "net/http/http_response_headers.h"
17 #include "net/proxy/proxy_service.h" 17 #include "net/proxy/proxy_service.h"
18 #include "net/url_request/url_fetcher.h" 18 #include "net/url_request/url_fetcher.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_status.h" 20 #include "net/url_request/url_request_status.h"
21 21
22 namespace browser_sync { 22 namespace syncer {
23 23
24 HttpBridge::RequestContextGetter::RequestContextGetter( 24 HttpBridge::RequestContextGetter::RequestContextGetter(
25 net::URLRequestContextGetter* baseline_context_getter, 25 net::URLRequestContextGetter* baseline_context_getter,
26 const std::string& user_agent) 26 const std::string& user_agent)
27 : baseline_context_getter_(baseline_context_getter), 27 : baseline_context_getter_(baseline_context_getter),
28 network_task_runner_( 28 network_task_runner_(
29 baseline_context_getter_->GetNetworkTaskRunner()), 29 baseline_context_getter_->GetNetworkTaskRunner()),
30 user_agent_(user_agent) { 30 user_agent_(user_agent) {
31 DCHECK(baseline_context_getter_); 31 DCHECK(baseline_context_getter_);
32 DCHECK(network_task_runner_); 32 DCHECK(network_task_runner_);
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // We defer deletion because we're inside a callback from a component of the 307 // We defer deletion because we're inside a callback from a component of the
308 // URLFetcher, so it seems most natural / "polite" to let the stack unwind. 308 // URLFetcher, so it seems most natural / "polite" to let the stack unwind.
309 MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster); 309 MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster);
310 fetch_state_.url_poster = NULL; 310 fetch_state_.url_poster = NULL;
311 311
312 // Wake the blocked syncer thread in MakeSynchronousPost. 312 // Wake the blocked syncer thread in MakeSynchronousPost.
313 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted! 313 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted!
314 http_post_completed_.Signal(); 314 http_post_completed_.Signal();
315 } 315 }
316 316
317 } // namespace browser_sync 317 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698