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

Side by Side Diff: chrome/browser/ui/webui/interstitials/interstitial_ui.cc

Issue 2928823003: Make it possible to build without enable_supervised_users.
Patch Set: Does it still compile with the feature enabled? Created 3 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/webui/interstitials/interstitial_ui.h" 5 #include "chrome/browser/ui/webui/interstitials/interstitial_ui.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" 13 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
14 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 14 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
15 #include "chrome/browser/safe_browsing/test_safe_browsing_blocking_page_quiet.h" 15 #include "chrome/browser/safe_browsing/test_safe_browsing_blocking_page_quiet.h"
16 #include "chrome/browser/safe_browsing/ui_manager.h" 16 #include "chrome/browser/safe_browsing/ui_manager.h"
17 #include "chrome/browser/ssl/bad_clock_blocking_page.h" 17 #include "chrome/browser/ssl/bad_clock_blocking_page.h"
18 #include "chrome/browser/ssl/ssl_blocking_page.h" 18 #include "chrome/browser/ssl/ssl_blocking_page.h"
19 #include "chrome/browser/supervised_user/supervised_user_interstitial.h"
20 #include "chrome/common/features.h" 19 #include "chrome/common/features.h"
21 #include "chrome/common/url_constants.h" 20 #include "chrome/common/url_constants.h"
22 #include "components/grit/components_resources.h" 21 #include "components/grit/components_resources.h"
23 #include "components/security_interstitials/core/ssl_error_ui.h" 22 #include "components/security_interstitials/core/ssl_error_ui.h"
24 #include "components/supervised_user_error_page/supervised_user_error_page.h" 23 #include "components/supervised_user_error_page/supervised_user_error_page.h"
25 #include "content/public/browser/interstitial_page_delegate.h" 24 #include "content/public/browser/interstitial_page_delegate.h"
26 #include "content/public/browser/render_frame_host.h" 25 #include "content/public/browser/render_frame_host.h"
27 #include "content/public/browser/render_process_host.h" 26 #include "content/public/browser/render_process_host.h"
28 #include "content/public/browser/url_data_source.h" 27 #include "content/public/browser/url_data_source.h"
29 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
30 #include "content/public/browser/web_ui.h" 29 #include "content/public/browser/web_ui.h"
31 #include "content/public/browser/web_ui_data_source.h" 30 #include "content/public/browser/web_ui_data_source.h"
32 #include "crypto/rsa_private_key.h" 31 #include "crypto/rsa_private_key.h"
33 #include "net/base/net_errors.h" 32 #include "net/base/net_errors.h"
34 #include "net/base/url_util.h" 33 #include "net/base/url_util.h"
35 #include "net/cert/x509_certificate.h" 34 #include "net/cert/x509_certificate.h"
36 #include "net/cert/x509_util.h" 35 #include "net/cert/x509_util.h"
37 #include "net/ssl/ssl_info.h" 36 #include "net/ssl/ssl_info.h"
38 #include "ui/base/resource/resource_bundle.h" 37 #include "ui/base/resource/resource_bundle.h"
39 #include "ui/base/webui/web_ui_util.h" 38 #include "ui/base/webui/web_ui_util.h"
40 39
41 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) 40 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
42 #include "chrome/browser/ssl/captive_portal_blocking_page.h" 41 #include "chrome/browser/ssl/captive_portal_blocking_page.h"
43 #endif 42 #endif
44 43
44 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
45 #include "chrome/browser/supervised_user/supervised_user_interstitial.h"
46 #endif
47
45 using security_interstitials::TestSafeBrowsingBlockingPageQuiet; 48 using security_interstitials::TestSafeBrowsingBlockingPageQuiet;
46 49
47 namespace { 50 namespace {
48 51
49 // NSS requires that serial numbers be unique even for the same issuer; 52 // NSS requires that serial numbers be unique even for the same issuer;
50 // as all fake certificates will contain the same issuer name, it's 53 // as all fake certificates will contain the same issuer name, it's
51 // necessary to ensure the serial number is unique, as otherwise 54 // necessary to ensure the serial number is unique, as otherwise
52 // NSS will fail to parse. 55 // NSS will fail to parse.
53 base::StaticAtomicSequenceNumber g_serial_number; 56 base::StaticAtomicSequenceNumber g_serial_number;
54 57
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 } else if (reason_string == "not_signed_in") { 485 } else if (reason_string == "not_signed_in") {
483 reason = supervised_user_error_page::NOT_SIGNED_IN; 486 reason = supervised_user_error_page::NOT_SIGNED_IN;
484 } 487 }
485 } 488 }
486 489
487 return supervised_user_error_page::BuildHtml( 490 return supervised_user_error_page::BuildHtml(
488 allow_access_requests, profile_image_url, profile_image_url2, custodian, 491 allow_access_requests, profile_image_url, profile_image_url2, custodian,
489 custodian_email, second_custodian, second_custodian_email, 492 custodian_email, second_custodian, second_custodian_email,
490 is_child_account, reason, g_browser_process->GetApplicationLocale()); 493 is_child_account, reason, g_browser_process->GetApplicationLocale());
491 } 494 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698