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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 10407124: Don't force non-session only cookies to be session only cookies, instead delete on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 7 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/safe_browsing/safe_browsing_service.h" 5 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 UMA_HISTOGRAM_LONG_TIMES("SB2.Delay", time); 604 UMA_HISTOGRAM_LONG_TIMES("SB2.Delay", time);
605 } 605 }
606 606
607 void SafeBrowsingService::InitURLRequestContextOnIOThread( 607 void SafeBrowsingService::InitURLRequestContextOnIOThread(
608 net::URLRequestContextGetter* system_url_request_context_getter) { 608 net::URLRequestContextGetter* system_url_request_context_getter) {
609 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 609 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
610 DCHECK(!url_request_context_.get()); 610 DCHECK(!url_request_context_.get());
611 611
612 scoped_refptr<net::CookieStore> cookie_store = new net::CookieMonster( 612 scoped_refptr<net::CookieStore> cookie_store = new net::CookieMonster(
613 new SQLitePersistentCookieStore( 613 new SQLitePersistentCookieStore(
614 FilePath(BaseFilename().value() + kCookiesFile), false), 614 FilePath(BaseFilename().value() + kCookiesFile), false, NULL),
615 NULL); 615 NULL);
616 616
617 url_request_context_.reset(new SafeBrowsingURLRequestContext); 617 url_request_context_.reset(new SafeBrowsingURLRequestContext);
618 // |system_url_request_context_getter| may be NULL during tests. 618 // |system_url_request_context_getter| may be NULL during tests.
619 if (system_url_request_context_getter) 619 if (system_url_request_context_getter)
620 url_request_context_->CopyFrom( 620 url_request_context_->CopyFrom(
621 system_url_request_context_getter->GetURLRequestContext()); 621 system_url_request_context_getter->GetURLRequestContext());
622 url_request_context_->set_cookie_store(cookie_store); 622 url_request_context_->set_cookie_store(cookie_store);
623 } 623 }
624 624
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 Stop(); 1425 Stop();
1426 1426
1427 if (csd_service_.get()) 1427 if (csd_service_.get())
1428 csd_service_->SetEnabledAndRefreshState(enable); 1428 csd_service_->SetEnabledAndRefreshState(enable);
1429 if (download_service_.get()) { 1429 if (download_service_.get()) {
1430 download_service_->SetEnabled( 1430 download_service_->SetEnabled(
1431 enable && !CommandLine::ForCurrentProcess()->HasSwitch( 1431 enable && !CommandLine::ForCurrentProcess()->HasSwitch(
1432 switches::kDisableImprovedDownloadProtection)); 1432 switches::kDisableImprovedDownloadProtection));
1433 } 1433 }
1434 } 1434 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698