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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 // The default SafeBrowsingServiceFactory. Global, made a singleton so we | 256 // The default SafeBrowsingServiceFactory. Global, made a singleton so we |
257 // don't leak it. | 257 // don't leak it. |
258 class SafeBrowsingServiceFactoryImpl : public SafeBrowsingServiceFactory { | 258 class SafeBrowsingServiceFactoryImpl : public SafeBrowsingServiceFactory { |
259 public: | 259 public: |
260 SafeBrowsingService* CreateSafeBrowsingService() override { | 260 SafeBrowsingService* CreateSafeBrowsingService() override { |
261 return new SafeBrowsingService(V4FeatureList::GetV4UsageStatus()); | 261 return new SafeBrowsingService(V4FeatureList::GetV4UsageStatus()); |
262 } | 262 } |
263 | 263 |
264 private: | 264 private: |
265 friend struct base::DefaultLazyInstanceTraits<SafeBrowsingServiceFactoryImpl>; | 265 friend struct base::LazyInstanceTraitsBase<SafeBrowsingServiceFactoryImpl>; |
266 | 266 |
267 SafeBrowsingServiceFactoryImpl() { } | 267 SafeBrowsingServiceFactoryImpl() { } |
268 | 268 |
269 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactoryImpl); | 269 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactoryImpl); |
270 }; | 270 }; |
271 | 271 |
272 static base::LazyInstance<SafeBrowsingServiceFactoryImpl>::Leaky | 272 static base::LazyInstance<SafeBrowsingServiceFactoryImpl>::Leaky |
273 g_safe_browsing_service_factory_impl = LAZY_INSTANCE_INITIALIZER; | 273 g_safe_browsing_service_factory_impl = LAZY_INSTANCE_INITIALIZER; |
274 | 274 |
275 // static | 275 // static |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 ping_manager()->ReportThreatDetails(report); | 767 ping_manager()->ReportThreatDetails(report); |
768 } | 768 } |
769 | 769 |
770 void SafeBrowsingService::ProcessResourceRequest( | 770 void SafeBrowsingService::ProcessResourceRequest( |
771 const ResourceRequestInfo& request) { | 771 const ResourceRequestInfo& request) { |
772 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 772 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
773 services_delegate_->ProcessResourceRequest(&request); | 773 services_delegate_->ProcessResourceRequest(&request); |
774 } | 774 } |
775 | 775 |
776 } // namespace safe_browsing | 776 } // namespace safe_browsing |
OLD | NEW |