OLD | NEW |
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/ui_manager.h" | 15 #include "chrome/browser/safe_browsing/ui_manager.h" |
16 #include "chrome/browser/ssl/bad_clock_blocking_page.h" | 16 #include "chrome/browser/ssl/bad_clock_blocking_page.h" |
17 #include "chrome/browser/ssl/ssl_blocking_page.h" | 17 #include "chrome/browser/ssl/ssl_blocking_page.h" |
18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
19 #include "chrome/grit/browser_resources.h" | |
20 #include "components/grit/components_resources.h" | 19 #include "components/grit/components_resources.h" |
21 #include "components/security_interstitials/core/ssl_error_ui.h" | 20 #include "components/security_interstitials/core/ssl_error_ui.h" |
22 #include "content/public/browser/interstitial_page_delegate.h" | 21 #include "content/public/browser/interstitial_page_delegate.h" |
23 #include "content/public/browser/render_frame_host.h" | 22 #include "content/public/browser/render_frame_host.h" |
24 #include "content/public/browser/render_process_host.h" | 23 #include "content/public/browser/render_process_host.h" |
25 #include "content/public/browser/url_data_source.h" | 24 #include "content/public/browser/url_data_source.h" |
26 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
27 #include "content/public/browser/web_ui.h" | 26 #include "content/public/browser/web_ui.h" |
28 #include "content/public/browser/web_ui_data_source.h" | 27 #include "content/public/browser/web_ui_data_source.h" |
29 #include "crypto/rsa_private_key.h" | 28 #include "crypto/rsa_private_key.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 html = interstitial_delegate.get()->GetHTMLContents(); | 375 html = interstitial_delegate.get()->GetHTMLContents(); |
377 } else { | 376 } else { |
378 html = ResourceBundle::GetSharedInstance() | 377 html = ResourceBundle::GetSharedInstance() |
379 .GetRawDataResource(IDR_SECURITY_INTERSTITIAL_UI_HTML) | 378 .GetRawDataResource(IDR_SECURITY_INTERSTITIAL_UI_HTML) |
380 .as_string(); | 379 .as_string(); |
381 } | 380 } |
382 scoped_refptr<base::RefCountedString> html_bytes = new base::RefCountedString; | 381 scoped_refptr<base::RefCountedString> html_bytes = new base::RefCountedString; |
383 html_bytes->data().assign(html.begin(), html.end()); | 382 html_bytes->data().assign(html.begin(), html.end()); |
384 callback.Run(html_bytes.get()); | 383 callback.Run(html_bytes.get()); |
385 } | 384 } |
OLD | NEW |