| 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_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 209 |
| 210 DISALLOW_COPY_AND_ASSIGN(ChromeBlobProtocolHandler); | 210 DISALLOW_COPY_AND_ASSIGN(ChromeBlobProtocolHandler); |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 } // namespace | 213 } // namespace |
| 214 | 214 |
| 215 void ProfileIOData::InitializeProfileParams(Profile* profile) { | 215 void ProfileIOData::InitializeProfileParams(Profile* profile) { |
| 216 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 216 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 217 PrefService* pref_service = profile->GetPrefs(); | 217 PrefService* pref_service = profile->GetPrefs(); |
| 218 | 218 |
| 219 next_download_id_thunk_ = profile->GetDownloadManager()->GetNextIdThunk(); |
| 220 |
| 219 scoped_ptr<ProfileParams> params(new ProfileParams); | 221 scoped_ptr<ProfileParams> params(new ProfileParams); |
| 220 params->is_incognito = profile->IsOffTheRecord(); | 222 params->is_incognito = profile->IsOffTheRecord(); |
| 221 params->clear_local_state_on_exit = | 223 params->clear_local_state_on_exit = |
| 222 pref_service->GetBoolean(prefs::kClearSiteDataOnExit); | 224 pref_service->GetBoolean(prefs::kClearSiteDataOnExit); |
| 223 | 225 |
| 224 params->appcache_service = profile->GetAppCacheService(); | 226 params->appcache_service = profile->GetAppCacheService(); |
| 225 | 227 |
| 226 // Set up Accept-Language and Accept-Charset header values | 228 // Set up Accept-Language and Accept-Charset header values |
| 227 params->accept_language = net::HttpUtil::GenerateAcceptLanguageHeader( | 229 params->accept_language = net::HttpUtil::GenerateAcceptLanguageHeader( |
| 228 pref_service->GetString(prefs::kAcceptLanguages)); | 230 pref_service->GetString(prefs::kAcceptLanguages)); |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 BrowserThread::IO, FROM_HERE, | 555 BrowserThread::IO, FROM_HERE, |
| 554 base::Bind( | 556 base::Bind( |
| 555 &ResourceDispatcherHost::CancelRequestsForContext, | 557 &ResourceDispatcherHost::CancelRequestsForContext, |
| 556 base::Unretained(g_browser_process->resource_dispatcher_host()), | 558 base::Unretained(g_browser_process->resource_dispatcher_host()), |
| 557 &resource_context_)); | 559 &resource_context_)); |
| 558 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 560 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 559 new ReleaseTask<ProfileIOData>(this)); | 561 new ReleaseTask<ProfileIOData>(this)); |
| 560 if (!posted) | 562 if (!posted) |
| 561 Release(); | 563 Release(); |
| 562 } | 564 } |
| OLD | NEW |