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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 135 } |
136 | 136 |
137 private: | 137 private: |
138 friend struct base::DefaultLazyInstanceTraits<SafeBrowsingServiceFactoryImpl>; | 138 friend struct base::DefaultLazyInstanceTraits<SafeBrowsingServiceFactoryImpl>; |
139 | 139 |
140 SafeBrowsingServiceFactoryImpl() { } | 140 SafeBrowsingServiceFactoryImpl() { } |
141 | 141 |
142 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactoryImpl); | 142 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactoryImpl); |
143 }; | 143 }; |
144 | 144 |
145 static base::LazyInstance<SafeBrowsingServiceFactoryImpl> | 145 static base::LazyInstance<SafeBrowsingServiceFactoryImpl>::Leaky |
146 g_safe_browsing_service_factory_impl = LAZY_INSTANCE_INITIALIZER; | 146 g_safe_browsing_service_factory_impl = LAZY_INSTANCE_INITIALIZER; |
147 | 147 |
148 // static | 148 // static |
149 base::FilePath SafeBrowsingService::GetCookieFilePathForTesting() { | 149 base::FilePath SafeBrowsingService::GetCookieFilePathForTesting() { |
150 return CookieFilePath(); | 150 return CookieFilePath(); |
151 } | 151 } |
152 | 152 |
153 // static | 153 // static |
154 base::FilePath SafeBrowsingService::GetBaseFilename() { | 154 base::FilePath SafeBrowsingService::GetBaseFilename() { |
155 base::FilePath path; | 155 base::FilePath path; |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 #if defined(FULL_SAFE_BROWSING) | 484 #if defined(FULL_SAFE_BROWSING) |
485 if (csd_service_.get()) | 485 if (csd_service_.get()) |
486 csd_service_->SetEnabledAndRefreshState(enable); | 486 csd_service_->SetEnabledAndRefreshState(enable); |
487 if (download_service_.get()) { | 487 if (download_service_.get()) { |
488 download_service_->SetEnabled( | 488 download_service_->SetEnabled( |
489 enable && !CommandLine::ForCurrentProcess()->HasSwitch( | 489 enable && !CommandLine::ForCurrentProcess()->HasSwitch( |
490 switches::kDisableImprovedDownloadProtection)); | 490 switches::kDisableImprovedDownloadProtection)); |
491 } | 491 } |
492 #endif | 492 #endif |
493 } | 493 } |
OLD | NEW |