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

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

Issue 12342030: Revert 184868 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 base::WorkerPool::GetTaskRunner(true)); 381 base::WorkerPool::GetTaskRunner(true));
382 } 382 }
383 383
384 // setup cookie store 384 // setup cookie store
385 if (!cookie_store) { 385 if (!cookie_store) {
386 DCHECK(!lazy_params_->cookie_path.empty()); 386 DCHECK(!lazy_params_->cookie_path.empty());
387 387
388 scoped_refptr<SQLitePersistentCookieStore> cookie_db = 388 scoped_refptr<SQLitePersistentCookieStore> cookie_db =
389 new SQLitePersistentCookieStore( 389 new SQLitePersistentCookieStore(
390 lazy_params_->cookie_path, 390 lazy_params_->cookie_path,
391 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
392 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
393 lazy_params_->restore_old_session_cookies, 391 lazy_params_->restore_old_session_cookies,
394 new ClearOnExitPolicy(lazy_params_->special_storage_policy)); 392 new ClearOnExitPolicy(lazy_params_->special_storage_policy));
395 cookie_store = 393 cookie_store =
396 new net::CookieMonster(cookie_db.get(), 394 new net::CookieMonster(cookie_db.get(),
397 profile_params->cookie_monster_delegate); 395 profile_params->cookie_monster_delegate);
398 cookie_store->GetCookieMonster()->SetPersistSessionCookies(true); 396 cookie_store->GetCookieMonster()->SetPersistSessionCookies(true);
399 } 397 }
400 398
401 main_context->set_cookie_store(cookie_store); 399 main_context->set_cookie_store(cookie_store);
402 400
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 489
492 extensions_context->set_net_log(io_thread->net_log()); 490 extensions_context->set_net_log(io_thread->net_log());
493 491
494 extensions_context->set_throttler_manager( 492 extensions_context->set_throttler_manager(
495 io_thread_globals->throttler_manager.get()); 493 io_thread_globals->throttler_manager.get());
496 494
497 net::CookieMonster* extensions_cookie_store = 495 net::CookieMonster* extensions_cookie_store =
498 new net::CookieMonster( 496 new net::CookieMonster(
499 new SQLitePersistentCookieStore( 497 new SQLitePersistentCookieStore(
500 lazy_params_->extensions_cookie_path, 498 lazy_params_->extensions_cookie_path,
501 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
502 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
503 lazy_params_->restore_old_session_cookies, NULL), NULL); 499 lazy_params_->restore_old_session_cookies, NULL), NULL);
504 // Enable cookies for devtools and extension URLs. 500 // Enable cookies for devtools and extension URLs.
505 const char* schemes[] = {chrome::kChromeDevToolsScheme, 501 const char* schemes[] = {chrome::kChromeDevToolsScheme,
506 extensions::kExtensionScheme}; 502 extensions::kExtensionScheme};
507 extensions_cookie_store->SetCookieableSchemes(schemes, 2); 503 extensions_cookie_store->SetCookieableSchemes(schemes, 2);
508 extensions_context->set_cookie_store(extensions_cookie_store); 504 extensions_context->set_cookie_store(extensions_cookie_store);
509 505
510 #if !defined(DISABLE_FTP_SUPPORT) 506 #if !defined(DISABLE_FTP_SUPPORT)
511 DCHECK(ftp_factory_.get()); 507 DCHECK(ftp_factory_.get());
512 extensions_context->set_ftp_transaction_factory(ftp_factory_.get()); 508 extensions_context->set_ftp_transaction_factory(ftp_factory_.get());
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 cookie_store = new net::CookieMonster(NULL, NULL); 585 cookie_store = new net::CookieMonster(NULL, NULL);
590 app_http_cache->set_mode( 586 app_http_cache->set_mode(
591 record_mode ? net::HttpCache::RECORD : net::HttpCache::PLAYBACK); 587 record_mode ? net::HttpCache::RECORD : net::HttpCache::PLAYBACK);
592 } 588 }
593 589
594 // Use an app-specific cookie store. 590 // Use an app-specific cookie store.
595 if (!cookie_store) { 591 if (!cookie_store) {
596 DCHECK(!cookie_path.empty()); 592 DCHECK(!cookie_path.empty());
597 593
598 scoped_refptr<SQLitePersistentCookieStore> cookie_db = 594 scoped_refptr<SQLitePersistentCookieStore> cookie_db =
599 new SQLitePersistentCookieStore( 595 new SQLitePersistentCookieStore(cookie_path, false, NULL);
600 cookie_path,
601 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
602 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
603 false,
604 NULL);
605 // TODO(creis): We should have a cookie delegate for notifying the cookie 596 // TODO(creis): We should have a cookie delegate for notifying the cookie
606 // extensions API, but we need to update it to understand isolated apps 597 // extensions API, but we need to update it to understand isolated apps
607 // first. 598 // first.
608 cookie_store = new net::CookieMonster(cookie_db.get(), NULL); 599 cookie_store = new net::CookieMonster(cookie_db.get(), NULL);
609 } 600 }
610 601
611 // Transfer ownership of the cookies and cache to AppRequestContext. 602 // Transfer ownership of the cookies and cache to AppRequestContext.
612 context->SetCookieStore(cookie_store); 603 context->SetCookieStore(cookie_store);
613 context->SetHttpTransactionFactory( 604 context->SetHttpTransactionFactory(
614 scoped_ptr<net::HttpTransactionFactory>(app_http_cache)); 605 scoped_ptr<net::HttpTransactionFactory>(app_http_cache));
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 base::Time time, 743 base::Time time,
753 const base::Closure& completion) { 744 const base::Closure& completion) {
754 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 745 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
755 DCHECK(initialized()); 746 DCHECK(initialized());
756 747
757 DCHECK(transport_security_state()); 748 DCHECK(transport_security_state());
758 transport_security_state()->DeleteSince(time); // Completes synchronously. 749 transport_security_state()->DeleteSince(time); // Completes synchronously.
759 DCHECK(http_server_properties_manager_); 750 DCHECK(http_server_properties_manager_);
760 http_server_properties_manager_->Clear(completion); 751 http_server_properties_manager_->Clear(completion);
761 } 752 }
OLDNEW
« no previous file with comments | « chrome/browser/net/sqlite_persistent_cookie_store_unittest.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698