| OLD | NEW |
| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 clear_local_state_on_exit_(false) {} | 158 clear_local_state_on_exit_(false) {} |
| 159 ProfileImplIOData::~ProfileImplIOData() { | 159 ProfileImplIOData::~ProfileImplIOData() { |
| 160 STLDeleteValues(&app_http_factory_map_); | 160 STLDeleteValues(&app_http_factory_map_); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void ProfileImplIOData::LazyInitializeInternal( | 163 void ProfileImplIOData::LazyInitializeInternal( |
| 164 ProfileParams* profile_params) const { | 164 ProfileParams* profile_params) const { |
| 165 // Keep track of clear_local_state_on_exit for isolated apps. | 165 // Keep track of clear_local_state_on_exit for isolated apps. |
| 166 clear_local_state_on_exit_ = profile_params->clear_local_state_on_exit; | 166 clear_local_state_on_exit_ = profile_params->clear_local_state_on_exit; |
| 167 | 167 |
| 168 safe_browsing_enabled_ = profile_params->safe_browsing_enabled; |
| 169 |
| 168 ChromeURLRequestContext* main_context = main_request_context(); | 170 ChromeURLRequestContext* main_context = main_request_context(); |
| 169 ChromeURLRequestContext* extensions_context = extensions_request_context(); | 171 ChromeURLRequestContext* extensions_context = extensions_request_context(); |
| 170 media_request_context_ = new RequestContext; | 172 media_request_context_ = new RequestContext; |
| 171 | 173 |
| 172 IOThread* const io_thread = profile_params->io_thread; | 174 IOThread* const io_thread = profile_params->io_thread; |
| 173 IOThread::Globals* const io_thread_globals = io_thread->globals(); | 175 IOThread::Globals* const io_thread_globals = io_thread->globals(); |
| 174 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 176 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 175 bool record_mode = chrome::kRecordModeEnabled && | 177 bool record_mode = chrome::kRecordModeEnabled && |
| 176 command_line.HasSwitch(switches::kRecordMode); | 178 command_line.HasSwitch(switches::kRecordMode); |
| 177 bool playback_mode = command_line.HasSwitch(switches::kPlaybackMode); | 179 bool playback_mode = command_line.HasSwitch(switches::kPlaybackMode); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 ProfileImplIOData::AcquireIsolatedAppRequestContext( | 373 ProfileImplIOData::AcquireIsolatedAppRequestContext( |
| 372 scoped_refptr<ChromeURLRequestContext> main_context, | 374 scoped_refptr<ChromeURLRequestContext> main_context, |
| 373 const std::string& app_id) const { | 375 const std::string& app_id) const { |
| 374 // We create per-app contexts on demand, unlike the others above. | 376 // We create per-app contexts on demand, unlike the others above. |
| 375 scoped_refptr<RequestContext> app_request_context = | 377 scoped_refptr<RequestContext> app_request_context = |
| 376 InitializeAppRequestContext(main_context, app_id); | 378 InitializeAppRequestContext(main_context, app_id); |
| 377 DCHECK(app_request_context); | 379 DCHECK(app_request_context); |
| 378 app_request_context->set_profile_io_data(this); | 380 app_request_context->set_profile_io_data(this); |
| 379 return app_request_context; | 381 return app_request_context; |
| 380 } | 382 } |
| OLD | NEW |