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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.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
« no previous file with comments | « chrome/browser/resources_util.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Implementation of the SafeBrowsingBlockingPage class. 5 // Implementation of the SafeBrowsingBlockingPage class.
6 6
7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" 7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "chrome/browser/interstitials/chrome_controller_client.h" 10 #include "chrome/browser/interstitials/chrome_controller_client.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 web_contents->GetBrowserContext()->IsOffTheRecord(), 72 web_contents->GetBrowserContext()->IsOffTheRecord(),
73 IsExtendedReportingEnabled(*prefs), IsScout(*prefs), 73 IsExtendedReportingEnabled(*prefs), IsScout(*prefs),
74 is_proceed_anyway_disabled); 74 is_proceed_anyway_disabled);
75 75
76 return new SafeBrowsingBlockingPage(ui_manager, web_contents, 76 return new SafeBrowsingBlockingPage(ui_manager, web_contents,
77 main_frame_url, unsafe_resources, 77 main_frame_url, unsafe_resources,
78 display_options); 78 display_options);
79 } 79 }
80 80
81 private: 81 private:
82 friend struct base::DefaultLazyInstanceTraits< 82 friend struct base::LazyInstanceTraitsBase<
83 SafeBrowsingBlockingPageFactoryImpl>; 83 SafeBrowsingBlockingPageFactoryImpl>;
84 84
85 SafeBrowsingBlockingPageFactoryImpl() { } 85 SafeBrowsingBlockingPageFactoryImpl() { }
86 86
87 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPageFactoryImpl); 87 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPageFactoryImpl);
88 }; 88 };
89 89
90 static base::LazyInstance<SafeBrowsingBlockingPageFactoryImpl> 90 static base::LazyInstance<SafeBrowsingBlockingPageFactoryImpl>::DestructorAtExit
91 g_safe_browsing_blocking_page_factory_impl = LAZY_INSTANCE_INITIALIZER; 91 g_safe_browsing_blocking_page_factory_impl = LAZY_INSTANCE_INITIALIZER;
92 92
93 // static 93 // static
94 content::InterstitialPageDelegate::TypeID 94 content::InterstitialPageDelegate::TypeID
95 SafeBrowsingBlockingPage::kTypeForTesting = 95 SafeBrowsingBlockingPage::kTypeForTesting =
96 &SafeBrowsingBlockingPage::kTypeForTesting; 96 &SafeBrowsingBlockingPage::kTypeForTesting;
97 97
98 SafeBrowsingBlockingPage::SafeBrowsingBlockingPage( 98 SafeBrowsingBlockingPage::SafeBrowsingBlockingPage(
99 BaseUIManager* ui_manager, 99 BaseUIManager* ui_manager,
100 WebContents* web_contents, 100 WebContents* web_contents,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 web_contents, unsafe_resources[0].url, 262 web_contents, unsafe_resources[0].url,
263 GetReportingInfo(unsafe_resources), 263 GetReportingInfo(unsafe_resources),
264 GetSamplingEventName(GetInterstitialReason(unsafe_resources))); 264 GetSamplingEventName(GetInterstitialReason(unsafe_resources)));
265 265
266 return base::MakeUnique<SecurityInterstitialControllerClient>( 266 return base::MakeUnique<SecurityInterstitialControllerClient>(
267 web_contents, std::move(metrics_helper), profile->GetPrefs(), 267 web_contents, std::move(metrics_helper), profile->GetPrefs(),
268 ui_manager->app_locale(), ui_manager->default_safe_page()); 268 ui_manager->app_locale(), ui_manager->default_safe_page());
269 } 269 }
270 270
271 } // namespace safe_browsing 271 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/resources_util.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698