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

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 6749044: Remove async functionality from net::CookiePolicy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/profiles/profile_impl_io_data.h" 5 #include "chrome/browser/profiles/profile_impl_io_data.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 bool record_mode = chrome::kRecordModeEnabled && 168 bool record_mode = chrome::kRecordModeEnabled &&
169 command_line.HasSwitch(switches::kRecordMode); 169 command_line.HasSwitch(switches::kRecordMode);
170 bool playback_mode = command_line.HasSwitch(switches::kPlaybackMode); 170 bool playback_mode = command_line.HasSwitch(switches::kPlaybackMode);
171 171
172 // Initialize context members. 172 // Initialize context members.
173 173
174 ApplyProfileParamsToContext(profile_params, main_request_context_); 174 ApplyProfileParamsToContext(profile_params, main_request_context_);
175 ApplyProfileParamsToContext(profile_params, media_request_context_); 175 ApplyProfileParamsToContext(profile_params, media_request_context_);
176 ApplyProfileParamsToContext(profile_params, extensions_request_context_); 176 ApplyProfileParamsToContext(profile_params, extensions_request_context_);
177 profile_params.appcache_service->set_request_context(main_request_context_); 177 profile_params.appcache_service->set_request_context(main_request_context_);
178 scoped_refptr<ChromeCookiePolicy> cookie_policy =
179 new ChromeCookiePolicy(profile_params.host_content_settings_map);
180 178
181 main_request_context_->set_chrome_cookie_policy(cookie_policy); 179 cookie_policy_.reset(
182 media_request_context_->set_chrome_cookie_policy(cookie_policy); 180 new ChromeCookiePolicy(profile_params.host_content_settings_map));
183 extensions_request_context_->set_chrome_cookie_policy(cookie_policy); 181 main_request_context_->set_cookie_policy(cookie_policy_.get());
182 media_request_context_->set_cookie_policy(cookie_policy_.get());
183 extensions_request_context_->set_cookie_policy(cookie_policy_.get());
184 184
185 main_request_context_->set_net_log(lazy_params_->io_thread->net_log()); 185 main_request_context_->set_net_log(lazy_params_->io_thread->net_log());
186 media_request_context_->set_net_log(lazy_params_->io_thread->net_log()); 186 media_request_context_->set_net_log(lazy_params_->io_thread->net_log());
187 extensions_request_context_->set_net_log(lazy_params_->io_thread->net_log()); 187 extensions_request_context_->set_net_log(lazy_params_->io_thread->net_log());
188 188
189 network_delegate_.reset(new ChromeNetworkDelegate( 189 network_delegate_.reset(new ChromeNetworkDelegate(
190 io_thread_globals->extension_event_router_forwarder.get(), 190 io_thread_globals->extension_event_router_forwarder.get(),
191 profile_params.profile_id, 191 profile_params.profile_id,
192 profile_params.protocol_handler_registry)); 192 profile_params.protocol_handler_registry));
193 main_request_context_->set_network_delegate(network_delegate_.get()); 193 main_request_context_->set_network_delegate(network_delegate_.get());
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 ProfileImplIOData::AcquireIsolatedAppRequestContext( 396 ProfileImplIOData::AcquireIsolatedAppRequestContext(
397 scoped_refptr<ChromeURLRequestContext> main_context, 397 scoped_refptr<ChromeURLRequestContext> main_context,
398 const std::string& app_id) const { 398 const std::string& app_id) const {
399 // We create per-app contexts on demand, unlike the others above. 399 // We create per-app contexts on demand, unlike the others above.
400 scoped_refptr<RequestContext> app_request_context = 400 scoped_refptr<RequestContext> app_request_context =
401 InitializeAppRequestContext(main_context, app_id); 401 InitializeAppRequestContext(main_context, app_id);
402 DCHECK(app_request_context); 402 DCHECK(app_request_context);
403 app_request_context->set_profile_io_data(this); 403 app_request_context->set_profile_io_data(this);
404 return app_request_context; 404 return app_request_context;
405 } 405 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | content/browser/renderer_host/render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698