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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 app_request_context_getter_map_[app_id] = context; | 137 app_request_context_getter_map_[app_id] = context; |
138 | 138 |
139 return context; | 139 return context; |
140 } | 140 } |
141 | 141 |
142 void ProfileImplIOData::Handle::LazyInitialize() const { | 142 void ProfileImplIOData::Handle::LazyInitialize() const { |
143 if (!initialized_) { | 143 if (!initialized_) { |
144 io_data_->InitializeProfileParams(profile_); | 144 io_data_->InitializeProfileParams(profile_); |
145 ChromeNetworkDelegate::InitializeReferrersEnabled( | 145 ChromeNetworkDelegate::InitializeReferrersEnabled( |
146 io_data_->enable_referrers(), profile_->GetPrefs()); | 146 io_data_->enable_referrers(), profile_->GetPrefs()); |
| 147 io_data_->clear_local_state_on_exit()->Init( |
| 148 prefs::kClearSiteDataOnExit, profile_->GetPrefs(), NULL); |
| 149 io_data_->clear_local_state_on_exit()->MoveToThread(BrowserThread::IO); |
147 initialized_ = true; | 150 initialized_ = true; |
148 } | 151 } |
149 } | 152 } |
150 | 153 |
151 ProfileImplIOData::LazyParams::LazyParams() | 154 ProfileImplIOData::LazyParams::LazyParams() |
152 : cache_max_size(0), | 155 : cache_max_size(0), |
153 media_cache_max_size(0) {} | 156 media_cache_max_size(0) {} |
154 ProfileImplIOData::LazyParams::~LazyParams() {} | 157 ProfileImplIOData::LazyParams::~LazyParams() {} |
155 | 158 |
156 ProfileImplIOData::ProfileImplIOData() | 159 ProfileImplIOData::ProfileImplIOData() |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 ProfileImplIOData::AcquireIsolatedAppRequestContext( | 374 ProfileImplIOData::AcquireIsolatedAppRequestContext( |
372 scoped_refptr<ChromeURLRequestContext> main_context, | 375 scoped_refptr<ChromeURLRequestContext> main_context, |
373 const std::string& app_id) const { | 376 const std::string& app_id) const { |
374 // We create per-app contexts on demand, unlike the others above. | 377 // We create per-app contexts on demand, unlike the others above. |
375 scoped_refptr<RequestContext> app_request_context = | 378 scoped_refptr<RequestContext> app_request_context = |
376 InitializeAppRequestContext(main_context, app_id); | 379 InitializeAppRequestContext(main_context, app_id); |
377 DCHECK(app_request_context); | 380 DCHECK(app_request_context); |
378 app_request_context->set_profile_io_data(this); | 381 app_request_context->set_profile_io_data(this); |
379 return app_request_context; | 382 return app_request_context; |
380 } | 383 } |
OLD | NEW |