OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/ssl/ssl_blocking_page.h" | 5 #include "chrome/browser/ssl/ssl_blocking_page.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/histogram.h" | 9 #include "base/histogram.h" |
10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 strings.SetString(L"proceed", | 75 strings.SetString(L"proceed", |
76 l10n_util::GetString(IDS_SSL_BLOCKING_PAGE_PROCEED)); | 76 l10n_util::GetString(IDS_SSL_BLOCKING_PAGE_PROCEED)); |
77 strings.SetString(L"exit", | 77 strings.SetString(L"exit", |
78 l10n_util::GetString(IDS_SSL_BLOCKING_PAGE_EXIT)); | 78 l10n_util::GetString(IDS_SSL_BLOCKING_PAGE_EXIT)); |
79 | 79 |
80 strings.SetString(L"textdirection", | 80 strings.SetString(L"textdirection", |
81 (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ? | 81 (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) ? |
82 L"rtl" : L"ltr"); | 82 L"rtl" : L"ltr"); |
83 | 83 |
84 static const StringPiece html( | 84 static const base::StringPiece html( |
85 ResourceBundle::GetSharedInstance().GetRawDataResource( | 85 ResourceBundle::GetSharedInstance().GetRawDataResource( |
86 IDR_SSL_ROAD_BLOCK_HTML)); | 86 IDR_SSL_ROAD_BLOCK_HTML)); |
87 | 87 |
88 return jstemplate_builder::GetI18nTemplateHtml(html, &strings); | 88 return jstemplate_builder::GetI18nTemplateHtml(html, &strings); |
89 } | 89 } |
90 | 90 |
91 void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) { | 91 void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) { |
92 const net::SSLInfo& ssl_info = handler_->ssl_info(); | 92 const net::SSLInfo& ssl_info = handler_->ssl_info(); |
93 int cert_id = CertStore::GetSharedInstance()->StoreCert( | 93 int cert_id = CertStore::GetSharedInstance()->StoreCert( |
94 ssl_info.cert, tab()->render_view_host()->process()->id()); | 94 ssl_info.cert, tab()->render_view_host()->process()->id()); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 L"moreInfo1", L"moreInfo2", L"moreInfo3", L"moreInfo4", L"moreInfo5" | 151 L"moreInfo1", L"moreInfo2", L"moreInfo3", L"moreInfo4", L"moreInfo5" |
152 }; | 152 }; |
153 int i; | 153 int i; |
154 for (i = 0; i < static_cast<int>(extra_info.size()); i++) { | 154 for (i = 0; i < static_cast<int>(extra_info.size()); i++) { |
155 strings->SetString(keys[i], extra_info[i]); | 155 strings->SetString(keys[i], extra_info[i]); |
156 } | 156 } |
157 for (;i < 5; i++) { | 157 for (;i < 5; i++) { |
158 strings->SetString(keys[i], L""); | 158 strings->SetString(keys[i], L""); |
159 } | 159 } |
160 } | 160 } |
OLD | NEW |