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

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

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 <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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | chrome/browser/safe_browsing/threat_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698