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

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

Issue 23964011: Reuse webview classic cookies file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fix Created 7 years, 3 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
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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 void SafeBrowsingService::InitURLRequestContextOnIOThread( 300 void SafeBrowsingService::InitURLRequestContextOnIOThread(
301 net::URLRequestContextGetter* system_url_request_context_getter) { 301 net::URLRequestContextGetter* system_url_request_context_getter) {
302 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 302 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
303 DCHECK(!url_request_context_.get()); 303 DCHECK(!url_request_context_.get());
304 304
305 scoped_refptr<net::CookieStore> cookie_store( 305 scoped_refptr<net::CookieStore> cookie_store(
306 content::CreatePersistentCookieStore( 306 content::CreatePersistentCookieStore(
307 CookieFilePath(), 307 CookieFilePath(),
308 false, 308 false,
309 NULL, 309 NULL,
310 NULL)); 310 NULL,
311 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
312 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
313 BrowserThread::GetBlockingPool()->GetSequenceToken())));
311 314
312 url_request_context_.reset(new net::URLRequestContext); 315 url_request_context_.reset(new net::URLRequestContext);
313 // |system_url_request_context_getter| may be NULL during tests. 316 // |system_url_request_context_getter| may be NULL during tests.
314 if (system_url_request_context_getter) { 317 if (system_url_request_context_getter) {
315 url_request_context_->CopyFrom( 318 url_request_context_->CopyFrom(
316 system_url_request_context_getter->GetURLRequestContext()); 319 system_url_request_context_getter->GetURLRequestContext());
317 } 320 }
318 url_request_context_->set_cookie_store(cookie_store.get()); 321 url_request_context_->set_cookie_store(cookie_store.get());
319 } 322 }
320 323
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 #if defined(FULL_SAFE_BROWSING) 483 #if defined(FULL_SAFE_BROWSING)
481 if (csd_service_.get()) 484 if (csd_service_.get())
482 csd_service_->SetEnabledAndRefreshState(enable); 485 csd_service_->SetEnabledAndRefreshState(enable);
483 if (download_service_.get()) { 486 if (download_service_.get()) {
484 download_service_->SetEnabled( 487 download_service_->SetEnabled(
485 enable && !CommandLine::ForCurrentProcess()->HasSwitch( 488 enable && !CommandLine::ForCurrentProcess()->HasSwitch(
486 switches::kDisableImprovedDownloadProtection)); 489 switches::kDisableImprovedDownloadProtection));
487 } 490 }
488 #endif 491 #endif
489 } 492 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698