OLD | NEW |
---|---|
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 19 matching lines...) Expand all Loading... | |
30 #include "chrome/browser/safe_browsing/protocol_manager.h" | 30 #include "chrome/browser/safe_browsing/protocol_manager.h" |
31 #include "chrome/browser/safe_browsing/safe_browsing_database.h" | 31 #include "chrome/browser/safe_browsing/safe_browsing_database.h" |
32 #include "chrome/browser/safe_browsing/ui_manager.h" | 32 #include "chrome/browser/safe_browsing/ui_manager.h" |
33 #include "chrome/common/chrome_constants.h" | 33 #include "chrome/common/chrome_constants.h" |
34 #include "chrome/common/chrome_paths.h" | 34 #include "chrome/common/chrome_paths.h" |
35 #include "chrome/common/chrome_switches.h" | 35 #include "chrome/common/chrome_switches.h" |
36 #include "chrome/common/pref_names.h" | 36 #include "chrome/common/pref_names.h" |
37 #include "chrome/common/url_constants.h" | 37 #include "chrome/common/url_constants.h" |
38 #include "components/startup_metric_utils/startup_metric_utils.h" | 38 #include "components/startup_metric_utils/startup_metric_utils.h" |
39 #include "content/public/browser/browser_thread.h" | 39 #include "content/public/browser/browser_thread.h" |
40 #include "content/public/browser/cookie_crypto_delegate.h" | |
erikwright (departed)
2013/10/22 23:58:14
forward decl
bcwhite
2013/10/23 19:36:23
Done.
| |
40 #include "content/public/browser/cookie_store_factory.h" | 41 #include "content/public/browser/cookie_store_factory.h" |
41 #include "content/public/browser/notification_service.h" | 42 #include "content/public/browser/notification_service.h" |
42 #include "net/cookies/cookie_monster.h" | 43 #include "net/cookies/cookie_monster.h" |
43 #include "net/url_request/url_request_context.h" | 44 #include "net/url_request/url_request_context.h" |
44 #include "net/url_request/url_request_context_getter.h" | 45 #include "net/url_request/url_request_context_getter.h" |
45 | 46 |
46 #if defined(OS_WIN) | 47 #if defined(OS_WIN) |
47 #include "chrome/installer/util/browser_distribution.h" | 48 #include "chrome/installer/util/browser_distribution.h" |
48 #endif | 49 #endif |
49 | 50 |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
303 net::URLRequestContextGetter* system_url_request_context_getter) { | 304 net::URLRequestContextGetter* system_url_request_context_getter) { |
304 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 305 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
305 DCHECK(!url_request_context_.get()); | 306 DCHECK(!url_request_context_.get()); |
306 | 307 |
307 scoped_refptr<net::CookieStore> cookie_store( | 308 scoped_refptr<net::CookieStore> cookie_store( |
308 content::CreatePersistentCookieStore( | 309 content::CreatePersistentCookieStore( |
309 CookieFilePath(), | 310 CookieFilePath(), |
310 false, | 311 false, |
311 NULL, | 312 NULL, |
312 NULL, | 313 NULL, |
313 scoped_refptr<base::SequencedTaskRunner>())); | 314 scoped_refptr<base::SequencedTaskRunner>(), |
315 scoped_ptr<content::CookieCryptoDelegate>())); | |
314 | 316 |
315 url_request_context_.reset(new net::URLRequestContext); | 317 url_request_context_.reset(new net::URLRequestContext); |
316 // |system_url_request_context_getter| may be NULL during tests. | 318 // |system_url_request_context_getter| may be NULL during tests. |
317 if (system_url_request_context_getter) { | 319 if (system_url_request_context_getter) { |
318 url_request_context_->CopyFrom( | 320 url_request_context_->CopyFrom( |
319 system_url_request_context_getter->GetURLRequestContext()); | 321 system_url_request_context_getter->GetURLRequestContext()); |
320 } | 322 } |
321 url_request_context_->set_cookie_store(cookie_store.get()); | 323 url_request_context_->set_cookie_store(cookie_store.get()); |
322 } | 324 } |
323 | 325 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
485 #if defined(FULL_SAFE_BROWSING) | 487 #if defined(FULL_SAFE_BROWSING) |
486 if (csd_service_.get()) | 488 if (csd_service_.get()) |
487 csd_service_->SetEnabledAndRefreshState(enable); | 489 csd_service_->SetEnabledAndRefreshState(enable); |
488 if (download_service_.get()) { | 490 if (download_service_.get()) { |
489 download_service_->SetEnabled( | 491 download_service_->SetEnabled( |
490 enable && !CommandLine::ForCurrentProcess()->HasSwitch( | 492 enable && !CommandLine::ForCurrentProcess()->HasSwitch( |
491 switches::kDisableImprovedDownloadProtection)); | 493 switches::kDisableImprovedDownloadProtection)); |
492 } | 494 } |
493 #endif | 495 #endif |
494 } | 496 } |
OLD | NEW |