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

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

Issue 197023: This CL changes the CookieStore obect to be a refcounted object to get a bett... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifdef CHROME_PERSONALIZATION 5 #ifdef CHROME_PERSONALIZATION
6 6
7 #include "chrome/browser/sync/glue/http_bridge.h" 7 #include "chrome/browser/sync/glue/http_bridge.h"
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // figure out if we need to give the user explicit control over policies etc. 72 // figure out if we need to give the user explicit control over policies etc.
73 accept_language_ = baseline_context->accept_language(); 73 accept_language_ = baseline_context->accept_language();
74 accept_charset_ = baseline_context->accept_charset(); 74 accept_charset_ = baseline_context->accept_charset();
75 75
76 // We default to the browser's user agent. This can (and should) be overridden 76 // We default to the browser's user agent. This can (and should) be overridden
77 // with set_user_agent. 77 // with set_user_agent.
78 user_agent_ = webkit_glue::GetUserAgent(GURL()); 78 user_agent_ = webkit_glue::GetUserAgent(GURL());
79 } 79 }
80 80
81 HttpBridge::RequestContext::~RequestContext() { 81 HttpBridge::RequestContext::~RequestContext() {
82 delete cookie_store_;
83 delete http_transaction_factory_; 82 delete http_transaction_factory_;
84 } 83 }
85 84
86 HttpBridge::HttpBridge(HttpBridge::RequestContext* context, 85 HttpBridge::HttpBridge(HttpBridge::RequestContext* context,
87 MessageLoop* io_loop) 86 MessageLoop* io_loop)
88 : context_for_request_(context), 87 : context_for_request_(context),
89 url_poster_(NULL), 88 url_poster_(NULL),
90 created_on_loop_(MessageLoop::current()), 89 created_on_loop_(MessageLoop::current()),
91 io_loop_(io_loop), 90 io_loop_(io_loop),
92 request_completed_(false), 91 request_completed_(false),
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 url_poster_ = NULL; 251 url_poster_ = NULL;
253 252
254 // Wake the blocked syncer thread in MakeSynchronousPost. 253 // Wake the blocked syncer thread in MakeSynchronousPost.
255 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted! 254 // WARNING: DONT DO ANYTHING AFTER THIS CALL! |this| may be deleted!
256 http_post_completed_.Signal(); 255 http_post_completed_.Signal();
257 } 256 }
258 257
259 } // namespace browser_sync 258 } // namespace browser_sync
260 259
261 #endif // CHROME_PERSONALIZATION 260 #endif // CHROME_PERSONALIZATION
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698