Chromium Code Reviews| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 317 if (!cookie_store) { | 317 if (!cookie_store) { |
| 318 DCHECK(!lazy_params_->cookie_path.empty()); | 318 DCHECK(!lazy_params_->cookie_path.empty()); |
| 319 | 319 |
| 320 scoped_refptr<SQLitePersistentCookieStore> cookie_db = | 320 scoped_refptr<SQLitePersistentCookieStore> cookie_db = |
| 321 new SQLitePersistentCookieStore(lazy_params_->cookie_path); | 321 new SQLitePersistentCookieStore(lazy_params_->cookie_path); |
| 322 cookie_db->SetClearLocalStateOnExit( | 322 cookie_db->SetClearLocalStateOnExit( |
| 323 profile_params->clear_local_state_on_exit); | 323 profile_params->clear_local_state_on_exit); |
| 324 cookie_store = | 324 cookie_store = |
| 325 new net::CookieMonster(cookie_db.get(), | 325 new net::CookieMonster(cookie_db.get(), |
| 326 profile_params->cookie_monster_delegate); | 326 profile_params->cookie_monster_delegate); |
| 327 if (command_line.HasSwitch(switches::kEnableRestoreSessionState)) | |
|
erikwright (departed)
2011/11/28 16:18:16
Is it fair to say that this flag would eventually
marja
2011/11/29 12:56:01
Afaik yes. (Added "experimental" to the comment de
| |
| 328 cookie_store->GetCookieMonster()->SetPersistSessionCookies(true); | |
| 327 } | 329 } |
| 328 | 330 |
| 329 net::CookieMonster* extensions_cookie_store = | 331 net::CookieMonster* extensions_cookie_store = |
| 330 new net::CookieMonster( | 332 new net::CookieMonster( |
| 331 new SQLitePersistentCookieStore( | 333 new SQLitePersistentCookieStore( |
| 332 lazy_params_->extensions_cookie_path), NULL); | 334 lazy_params_->extensions_cookie_path), NULL); |
| 333 // Enable cookies for devtools and extension URLs. | 335 // Enable cookies for devtools and extension URLs. |
| 334 const char* schemes[] = {chrome::kChromeDevToolsScheme, | 336 const char* schemes[] = {chrome::kChromeDevToolsScheme, |
| 335 chrome::kExtensionScheme}; | 337 chrome::kExtensionScheme}; |
| 336 extensions_cookie_store->SetCookieableSchemes(schemes, 2); | 338 extensions_cookie_store->SetCookieableSchemes(schemes, 2); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 487 scoped_refptr<ChromeURLRequestContext> | 489 scoped_refptr<ChromeURLRequestContext> |
| 488 ProfileImplIOData::AcquireIsolatedAppRequestContext( | 490 ProfileImplIOData::AcquireIsolatedAppRequestContext( |
| 489 scoped_refptr<ChromeURLRequestContext> main_context, | 491 scoped_refptr<ChromeURLRequestContext> main_context, |
| 490 const std::string& app_id) const { | 492 const std::string& app_id) const { |
| 491 // We create per-app contexts on demand, unlike the others above. | 493 // We create per-app contexts on demand, unlike the others above. |
| 492 scoped_refptr<ChromeURLRequestContext> app_request_context = | 494 scoped_refptr<ChromeURLRequestContext> app_request_context = |
| 493 InitializeAppRequestContext(main_context, app_id); | 495 InitializeAppRequestContext(main_context, app_id); |
| 494 DCHECK(app_request_context); | 496 DCHECK(app_request_context); |
| 495 return app_request_context; | 497 return app_request_context; |
| 496 } | 498 } |
| OLD | NEW |