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

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

Issue 11881055: Simplify WebUI data sources. Currently WebUI data sources implement a URLDataSourceDelegate interfa… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix issue in about_ui exposed by cros tests Created 7 years, 11 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 | Annotate | Revision Log
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 <string> 9 #include <string>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/lazy_instance.h" 13 #include "base/lazy_instance.h"
14 #include "base/metrics/field_trial.h" 14 #include "base/metrics/field_trial.h"
15 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
16 #include "base/string_number_conversions.h" 16 #include "base/string_number_conversions.h"
17 #include "base/string_piece.h" 17 #include "base/string_piece.h"
18 #include "base/stringprintf.h" 18 #include "base/stringprintf.h"
19 #include "base/time.h" 19 #include "base/time.h"
20 #include "base/utf_string_conversions.h" 20 #include "base/utf_string_conversions.h"
21 #include "base/values.h" 21 #include "base/values.h"
22 #include "chrome/browser/browser_process.h" 22 #include "chrome/browser/browser_process.h"
23 #include "chrome/browser/google/google_util.h" 23 #include "chrome/browser/google/google_util.h"
24 #include "chrome/browser/prefs/pref_service.h" 24 #include "chrome/browser/prefs/pref_service.h"
25 #include "chrome/browser/profiles/profile.h" 25 #include "chrome/browser/profiles/profile.h"
26 #include "chrome/browser/renderer_preferences_util.h" 26 #include "chrome/browser/renderer_preferences_util.h"
27 #include "chrome/browser/safe_browsing/malware_details.h" 27 #include "chrome/browser/safe_browsing/malware_details.h"
28 #include "chrome/browser/safe_browsing/ui_manager.h" 28 #include "chrome/browser/safe_browsing/ui_manager.h"
29 #include "chrome/browser/tab_contents/tab_util.h" 29 #include "chrome/browser/tab_contents/tab_util.h"
30 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 30 #include "chrome/browser/ui/webui/web_ui_util.h"
31 #include "chrome/common/jstemplate_builder.h" 31 #include "chrome/common/jstemplate_builder.h"
32 #include "chrome/common/pref_names.h" 32 #include "chrome/common/pref_names.h"
33 #include "chrome/common/url_constants.h" 33 #include "chrome/common/url_constants.h"
34 #include "content/public/browser/browser_thread.h" 34 #include "content/public/browser/browser_thread.h"
35 #include "content/public/browser/interstitial_page.h" 35 #include "content/public/browser/interstitial_page.h"
36 #include "content/public/browser/navigation_controller.h" 36 #include "content/public/browser/navigation_controller.h"
37 #include "content/public/browser/user_metrics.h" 37 #include "content/public/browser/user_metrics.h"
38 #include "content/public/browser/web_contents.h" 38 #include "content/public/browser/web_contents.h"
39 #include "grit/browser_resources.h" 39 #include "grit/browser_resources.h"
40 #include "grit/chromium_strings.h" 40 #include "grit/chromium_strings.h"
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 strings->SetBoolean("isMainFrame", is_main_frame_load_blocked_); 940 strings->SetBoolean("isMainFrame", is_main_frame_load_blocked_);
941 strings->SetBoolean("isPhishing", interstitial_type_ == TYPE_PHISHING); 941 strings->SetBoolean("isPhishing", interstitial_type_ == TYPE_PHISHING);
942 942
943 strings->SetString("back_button", 943 strings->SetString("back_button",
944 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_BACK_BUTTON)); 944 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_BACK_BUTTON));
945 strings->SetString("seeMore", l10n_util::GetStringUTF16( 945 strings->SetString("seeMore", l10n_util::GetStringUTF16(
946 IDS_SAFE_BROWSING_MALWARE_V2_SEE_MORE)); 946 IDS_SAFE_BROWSING_MALWARE_V2_SEE_MORE));
947 strings->SetString("proceed", 947 strings->SetString("proceed",
948 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_PROCEED_LINK)); 948 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_PROCEED_LINK));
949 949
950 URLDataSource::SetFontAndTextDirection(strings); 950 web_ui_util::SetFontAndTextDirection(strings);
951 } 951 }
952 952
953 void SafeBrowsingBlockingPageV2::PopulateMultipleThreatStringDictionary( 953 void SafeBrowsingBlockingPageV2::PopulateMultipleThreatStringDictionary(
954 DictionaryValue* strings) { 954 DictionaryValue* strings) {
955 NOTREACHED(); 955 NOTREACHED();
956 } 956 }
957 957
958 void SafeBrowsingBlockingPageV2::PopulateMalwareStringDictionary( 958 void SafeBrowsingBlockingPageV2::PopulateMalwareStringDictionary(
959 DictionaryValue* strings) { 959 DictionaryValue* strings) {
960 std::string diagnostic_link = base::StringPrintf(kSbDiagnosticHtml, 960 std::string diagnostic_link = base::StringPrintf(kSbDiagnosticHtml,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 1043
1044 strings->SetString("details", ""); 1044 strings->SetString("details", "");
1045 strings->SetString("confirm_text", ""); 1045 strings->SetString("confirm_text", "");
1046 strings->SetString(kBoxChecked, ""); 1046 strings->SetString(kBoxChecked, "");
1047 strings->SetString("report_error", 1047 strings->SetString("report_error",
1048 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_REPORT_ERROR)); 1048 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_REPORT_ERROR));
1049 strings->SetBoolean(kDisplayCheckBox, false); 1049 strings->SetBoolean(kDisplayCheckBox, false);
1050 strings->SetString("learnMore", 1050 strings->SetString("learnMore",
1051 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE)); 1051 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE));
1052 } 1052 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698