OLD | NEW |
1 // Copyright (c) 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.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" |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 // We defer deletion because we're inside a callback from a component of the | 305 // We defer deletion because we're inside a callback from a component of the |
306 // URLFetcher, so it seems most natural / "polite" to let the stack unwind. | 306 // URLFetcher, so it seems most natural / "polite" to let the stack unwind. |
307 MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster); | 307 MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster); |
308 fetch_state_.url_poster = NULL; | 308 fetch_state_.url_poster = NULL; |
309 | 309 |
310 // Wake the blocked syncer thread in MakeSynchronousPost. | 310 // Wake the blocked syncer thread in MakeSynchronousPost. |
311 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted! | 311 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted! |
312 http_post_completed_.Signal(); | 312 http_post_completed_.Signal(); |
313 } | 313 } |
314 | 314 |
| 315 net::URLRequestContextGetter* HttpBridge::GetRequestContextGetterForTest() |
| 316 const { |
| 317 return context_getter_for_request_; |
| 318 } |
| 319 |
315 } // namespace syncer | 320 } // namespace syncer |
OLD | NEW |