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

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

Issue 110883017: Add CookieStoreConfig to unify API for in-memory and persistent CookieStore Creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge ToT again. Created 6 years, 11 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
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 return NULL; 299 return NULL;
300 #endif 300 #endif
301 } 301 }
302 302
303 void SafeBrowsingService::InitURLRequestContextOnIOThread( 303 void SafeBrowsingService::InitURLRequestContextOnIOThread(
304 net::URLRequestContextGetter* system_url_request_context_getter) { 304 net::URLRequestContextGetter* system_url_request_context_getter) {
305 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 305 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
306 DCHECK(!url_request_context_.get()); 306 DCHECK(!url_request_context_.get());
307 307
308 scoped_refptr<net::CookieStore> cookie_store( 308 scoped_refptr<net::CookieStore> cookie_store(
309 content::CreatePersistentCookieStore( 309 content::CreateCookieStore(
310 CookieFilePath(), 310 content::CookieStoreConfig(
311 false, 311 CookieFilePath(),
312 NULL, 312 content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES,
313 NULL, 313 NULL,
314 scoped_ptr<content::CookieCryptoDelegate>())); 314 NULL)));
315 315
316 url_request_context_.reset(new net::URLRequestContext); 316 url_request_context_.reset(new net::URLRequestContext);
317 // |system_url_request_context_getter| may be NULL during tests. 317 // |system_url_request_context_getter| may be NULL during tests.
318 if (system_url_request_context_getter) { 318 if (system_url_request_context_getter) {
319 url_request_context_->CopyFrom( 319 url_request_context_->CopyFrom(
320 system_url_request_context_getter->GetURLRequestContext()); 320 system_url_request_context_getter->GetURLRequestContext());
321 } 321 }
322 url_request_context_->set_cookie_store(cookie_store.get()); 322 url_request_context_->set_cookie_store(cookie_store.get());
323 } 323 }
324 324
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 #if defined(FULL_SAFE_BROWSING) 492 #if defined(FULL_SAFE_BROWSING)
493 if (csd_service_.get()) 493 if (csd_service_.get())
494 csd_service_->SetEnabledAndRefreshState(enable); 494 csd_service_->SetEnabledAndRefreshState(enable);
495 if (download_service_.get()) { 495 if (download_service_.get()) {
496 download_service_->SetEnabled( 496 download_service_->SetEnabled(
497 enable && !CommandLine::ForCurrentProcess()->HasSwitch( 497 enable && !CommandLine::ForCurrentProcess()->HasSwitch(
498 switches::kDisableImprovedDownloadProtection)); 498 switches::kDisableImprovedDownloadProtection));
499 } 499 }
500 #endif 500 #endif
501 } 501 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698