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

Side by Side Diff: chrome/browser/sync/glue/http_bridge.cc

Issue 9958145: Audit the destructors of classes derived from net::URLRequestContextGetter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ToT Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/glue/http_bridge.h ('k') | chrome/test/base/testing_profile.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 (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 "chrome/browser/sync/glue/http_bridge.h" 5 #include "chrome/browser/sync/glue/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 "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 12 matching lines...) Expand all
23 23
24 using content::BrowserThread; 24 using content::BrowserThread;
25 25
26 namespace browser_sync { 26 namespace browser_sync {
27 27
28 HttpBridge::RequestContextGetter::RequestContextGetter( 28 HttpBridge::RequestContextGetter::RequestContextGetter(
29 net::URLRequestContextGetter* baseline_context_getter) 29 net::URLRequestContextGetter* baseline_context_getter)
30 : baseline_context_getter_(baseline_context_getter) { 30 : baseline_context_getter_(baseline_context_getter) {
31 } 31 }
32 32
33 HttpBridge::RequestContextGetter::~RequestContextGetter() {}
34
33 net::URLRequestContext* 35 net::URLRequestContext*
34 HttpBridge::RequestContextGetter::GetURLRequestContext() { 36 HttpBridge::RequestContextGetter::GetURLRequestContext() {
35 // Lazily create the context. 37 // Lazily create the context.
36 if (!context_) { 38 if (!context_) {
37 net::URLRequestContext* baseline_context = 39 net::URLRequestContext* baseline_context =
38 baseline_context_getter_->GetURLRequestContext(); 40 baseline_context_getter_->GetURLRequestContext();
39 context_ = new RequestContext(baseline_context); 41 context_ = new RequestContext(baseline_context);
40 baseline_context_getter_ = NULL; 42 baseline_context_getter_ = NULL;
41 } 43 }
42 44
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 // URLFetcher, so it seems most natural / "polite" to let the stack unwind. 301 // URLFetcher, so it seems most natural / "polite" to let the stack unwind.
300 MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster); 302 MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster);
301 fetch_state_.url_poster = NULL; 303 fetch_state_.url_poster = NULL;
302 304
303 // Wake the blocked syncer thread in MakeSynchronousPost. 305 // Wake the blocked syncer thread in MakeSynchronousPost.
304 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted! 306 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted!
305 http_post_completed_.Signal(); 307 http_post_completed_.Signal();
306 } 308 }
307 309
308 } // namespace browser_sync 310 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/http_bridge.h ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698