| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/security_interstitials/core/bad_clock_ui.h" | 5 #include "components/security_interstitials/core/bad_clock_ui.h" |
| 6 | 6 |
| 7 #include "base/i18n/time_formatting.h" | 7 #include "base/i18n/time_formatting.h" |
| 8 #include "components/security_interstitials/core/common_string_util.h" | 8 #include "components/security_interstitials/core/common_string_util.h" |
| 9 #include "components/security_interstitials/core/metrics_helper.h" | 9 #include "components/security_interstitials/core/metrics_helper.h" |
| 10 #include "grit/components_strings.h" | 10 #include "grit/components_strings.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 controller_->metrics_helper()->RecordShutdownMetrics(); | 35 controller_->metrics_helper()->RecordShutdownMetrics(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 void BadClockUI::PopulateStringsForHTML(base::DictionaryValue* load_time_data) { | 38 void BadClockUI::PopulateStringsForHTML(base::DictionaryValue* load_time_data) { |
| 39 CHECK(load_time_data); | 39 CHECK(load_time_data); |
| 40 | 40 |
| 41 // Shared with other SSL errors. | 41 // Shared with other SSL errors. |
| 42 common_string_util::PopulateSSLLayoutStrings(cert_error_, load_time_data); | 42 common_string_util::PopulateSSLLayoutStrings(cert_error_, load_time_data); |
| 43 common_string_util::PopulateSSLDebuggingStrings(ssl_info_, time_triggered_, | 43 common_string_util::PopulateSSLDebuggingStrings(ssl_info_, time_triggered_, |
| 44 load_time_data); | 44 load_time_data); |
| 45 common_string_util::PopulateNewIconStrings(load_time_data); |
| 45 | 46 |
| 46 // Clock-specific strings. | 47 // Clock-specific strings. |
| 47 PopulateClockStrings(load_time_data); | 48 PopulateClockStrings(load_time_data); |
| 48 load_time_data->SetString("finalParagraph", std::string()); // Placeholder. | 49 load_time_data->SetString("finalParagraph", std::string()); // Placeholder. |
| 49 } | 50 } |
| 50 | 51 |
| 51 void BadClockUI::PopulateClockStrings(base::DictionaryValue* load_time_data) { | 52 void BadClockUI::PopulateClockStrings(base::DictionaryValue* load_time_data) { |
| 52 load_time_data->SetBoolean("bad_clock", true); | 53 load_time_data->SetBoolean("bad_clock", true); |
| 53 load_time_data->SetBoolean("overridable", false); | 54 load_time_data->SetBoolean("overridable", false); |
| 54 load_time_data->SetBoolean("hide_primary_button", | 55 load_time_data->SetBoolean("hide_primary_button", |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 NOTREACHED() << "Unsupported command: " << command; | 118 NOTREACHED() << "Unsupported command: " << command; |
| 118 case CMD_ERROR: | 119 case CMD_ERROR: |
| 119 case CMD_TEXT_FOUND: | 120 case CMD_TEXT_FOUND: |
| 120 case CMD_TEXT_NOT_FOUND: | 121 case CMD_TEXT_NOT_FOUND: |
| 121 // Commands are only for testing. | 122 // Commands are only for testing. |
| 122 NOTREACHED() << "Unexpected command: " << command; | 123 NOTREACHED() << "Unexpected command: " << command; |
| 123 } | 124 } |
| 124 } | 125 } |
| 125 | 126 |
| 126 } // security_interstitials | 127 } // security_interstitials |
| OLD | NEW |