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

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

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: most unittests pass Created 7 years, 4 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 return NULL; 296 return NULL;
297 #endif 297 #endif
298 } 298 }
299 299
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::CreateCookieStore(
307 CookieFilePath(), 307 content::CookieStoreConfig::Persistent(CookieFilePath(), false)));
308 false,
309 NULL,
310 NULL));
311 308
312 url_request_context_.reset(new net::URLRequestContext); 309 url_request_context_.reset(new net::URLRequestContext);
313 // |system_url_request_context_getter| may be NULL during tests. 310 // |system_url_request_context_getter| may be NULL during tests.
314 if (system_url_request_context_getter) { 311 if (system_url_request_context_getter) {
315 url_request_context_->CopyFrom( 312 url_request_context_->CopyFrom(
316 system_url_request_context_getter->GetURLRequestContext()); 313 system_url_request_context_getter->GetURLRequestContext());
317 } 314 }
318 url_request_context_->set_cookie_store(cookie_store.get()); 315 url_request_context_->set_cookie_store(cookie_store.get());
319 } 316 }
320 317
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 #if defined(FULL_SAFE_BROWSING) 477 #if defined(FULL_SAFE_BROWSING)
481 if (csd_service_.get()) 478 if (csd_service_.get())
482 csd_service_->SetEnabledAndRefreshState(enable); 479 csd_service_->SetEnabledAndRefreshState(enable);
483 if (download_service_.get()) { 480 if (download_service_.get()) {
484 download_service_->SetEnabled( 481 download_service_->SetEnabled(
485 enable && !CommandLine::ForCurrentProcess()->HasSwitch( 482 enable && !CommandLine::ForCurrentProcess()->HasSwitch(
486 switches::kDisableImprovedDownloadProtection)); 483 switches::kDisableImprovedDownloadProtection));
487 } 484 }
488 #endif 485 #endif
489 } 486 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698