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

Side by Side Diff: components/safe_browsing/base_blocking_page.cc

Issue 2854263003: Add quiet safe browsing interstitial for WebView (Closed)
Patch Set: Fix unit test Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "components/safe_browsing/base_blocking_page.h" 5 #include "components/safe_browsing/base_blocking_page.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 static_cast<security_interstitials::SecurityInterstitialCommands>( 201 static_cast<security_interstitials::SecurityInterstitialCommands>(
202 command)); 202 command));
203 } 203 }
204 204
205 bool BaseBlockingPage::ShouldCreateNewNavigation() const { 205 bool BaseBlockingPage::ShouldCreateNewNavigation() const {
206 return sb_error_ui_->is_main_frame_load_blocked(); 206 return sb_error_ui_->is_main_frame_load_blocked();
207 } 207 }
208 208
209 void BaseBlockingPage::PopulateInterstitialStrings( 209 void BaseBlockingPage::PopulateInterstitialStrings(
210 base::DictionaryValue* load_time_data) { 210 base::DictionaryValue* load_time_data) {
211 sb_error_ui_->PopulateStringsForHTML(load_time_data); 211 sb_error_ui_->PopulateStringsForHtml(load_time_data);
212 } 212 }
213 213
214 void BaseBlockingPage::FinishThreatDetails(const base::TimeDelta& delay, 214 void BaseBlockingPage::FinishThreatDetails(const base::TimeDelta& delay,
215 bool did_proceed, 215 bool did_proceed,
216 int num_visits) {} 216 int num_visits) {}
217 217
218 // static 218 // static
219 BaseBlockingPage::UnsafeResourceMap* 219 BaseBlockingPage::UnsafeResourceMap*
220 BaseBlockingPage::GetUnsafeResourcesMap() { 220 BaseBlockingPage::GetUnsafeResourcesMap() {
221 return g_unsafe_resource_map.Pointer(); 221 return g_unsafe_resource_map.Pointer();
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 base::MakeUnique<security_interstitials::MetricsHelper>( 344 base::MakeUnique<security_interstitials::MetricsHelper>(
345 unsafe_resources[0].url, GetReportingInfo(unsafe_resources), 345 unsafe_resources[0].url, GetReportingInfo(unsafe_resources),
346 history_service); 346 history_service);
347 347
348 return base::MakeUnique<SecurityInterstitialControllerClient>( 348 return base::MakeUnique<SecurityInterstitialControllerClient>(
349 web_contents, std::move(metrics_helper), nullptr, /* prefs */ 349 web_contents, std::move(metrics_helper), nullptr, /* prefs */
350 ui_manager->app_locale(), ui_manager->default_safe_page()); 350 ui_manager->app_locale(), ui_manager->default_safe_page());
351 } 351 }
352 352
353 } // namespace safe_browsing 353 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/resources/security_interstitials_resources.grdp ('k') | components/security_interstitials/core/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698