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

Side by Side Diff: chrome/browser/automation/automation_profile_impl.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-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/automation/automation_profile_impl.h" 5 #include "chrome/browser/automation/automation_profile_impl.h"
6 #include "chrome/browser/net/chrome_url_request_context.h" 6 #include "chrome/browser/net/chrome_url_request_context.h"
7 #include "chrome/test/automation/automation_messages.h" 7 #include "chrome/test/automation/automation_messages.h"
8 8
9 // A special Request context for automation. Substitute a few things 9 // A special Request context for automation. Substitute a few things
10 // like cookie store, proxy settings etc to handle them differently 10 // like cookie store, proxy settings etc to handle them differently
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 private: 106 private:
107 DISALLOW_COPY_AND_ASSIGN(AutomationCookieStore); 107 DISALLOW_COPY_AND_ASSIGN(AutomationCookieStore);
108 }; 108 };
109 109
110 void AutomationProfileImpl::Initialize(Profile* original_profile, 110 void AutomationProfileImpl::Initialize(Profile* original_profile,
111 IPC::Message::Sender* automation_client) { 111 IPC::Message::Sender* automation_client) {
112 DCHECK(original_profile); 112 DCHECK(original_profile);
113 original_profile_ = original_profile; 113 original_profile_ = original_profile;
114 114
115 URLRequestContext* original_context = original_profile_->GetRequestContext(); 115 URLRequestContext* original_context = original_profile_->GetRequestContext();
116 net::CookieStore* original_cookie_store = original_context->cookie_store(); 116 scoped_refptr<net::CookieStore> original_cookie_store =
117 alternate_cookie_store_.reset(new AutomationCookieStore(this, 117 original_context->cookie_store();
118 original_cookie_store, 118 alternate_cookie_store_ = new AutomationCookieStore(this,
119 automation_client)); 119 original_cookie_store,
120 automation_client);
120 alternate_reqeust_context_ = new AutomationURLRequestContext( 121 alternate_reqeust_context_ = new AutomationURLRequestContext(
121 original_context, alternate_cookie_store_.get()); 122 original_context, alternate_cookie_store_.get());
122 } 123 }
123 124
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698