OLD | NEW |
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 #include "chrome/browser/managed_mode/managed_mode_interstitial.h" | 5 #include "chrome/browser/managed_mode/managed_mode_interstitial.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" | 8 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" |
9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 l10n_util::GetStringUTF16(IDS_BLOCK_INTERSTITIAL_MESSAGE)); | 98 l10n_util::GetStringUTF16(IDS_BLOCK_INTERSTITIAL_MESSAGE)); |
99 strings.SetString("blockedUrl", net::FormatUrl(url_, languages_)); | 99 strings.SetString("blockedUrl", net::FormatUrl(url_, languages_)); |
100 strings.SetString("bypassBlockMessage", | 100 strings.SetString("bypassBlockMessage", |
101 l10n_util::GetStringUTF16(IDS_BYPASS_BLOCK_MESSAGE)); | 101 l10n_util::GetStringUTF16(IDS_BYPASS_BLOCK_MESSAGE)); |
102 strings.SetString("bypassBlockButton", | 102 strings.SetString("bypassBlockButton", |
103 l10n_util::GetStringUTF16(IDS_BYPASS_BLOCK_BUTTON)); | 103 l10n_util::GetStringUTF16(IDS_BYPASS_BLOCK_BUTTON)); |
104 strings.SetString("backButton", l10n_util::GetStringUTF16(IDS_BACK_BUTTON)); | 104 strings.SetString("backButton", l10n_util::GetStringUTF16(IDS_BACK_BUTTON)); |
105 strings.SetString( | 105 strings.SetString( |
106 "contentPacksSectionButton", | 106 "contentPacksSectionButton", |
107 l10n_util::GetStringUTF16(IDS_CONTENT_PACKS_SECTION_BUTTON)); | 107 l10n_util::GetStringUTF16(IDS_CONTENT_PACKS_SECTION_BUTTON)); |
108 ChromeURLDataManager::DataSource::SetFontAndTextDirection(&strings); | 108 URLDataSource::SetFontAndTextDirection(&strings); |
109 | 109 |
110 base::StringPiece html( | 110 base::StringPiece html( |
111 ResourceBundle::GetSharedInstance().GetRawDataResource( | 111 ResourceBundle::GetSharedInstance().GetRawDataResource( |
112 IDR_MANAGED_MODE_BLOCK_INTERSTITIAL_HTML)); | 112 IDR_MANAGED_MODE_BLOCK_INTERSTITIAL_HTML)); |
113 | 113 |
114 jstemplate_builder::UseVersion2 version; | 114 jstemplate_builder::UseVersion2 version; |
115 return jstemplate_builder::GetI18nTemplateHtml(html, &strings); | 115 return jstemplate_builder::GetI18nTemplateHtml(html, &strings); |
116 } | 116 } |
117 | 117 |
118 void ManagedModeInterstitial::CommandReceived(const std::string& command) { | 118 void ManagedModeInterstitial::CommandReceived(const std::string& command) { |
(...skipping 21 matching lines...) Expand all Loading... |
140 | 140 |
141 void ManagedModeInterstitial::OnDontProceed() { | 141 void ManagedModeInterstitial::OnDontProceed() { |
142 DispatchContinueRequest(false); | 142 DispatchContinueRequest(false); |
143 } | 143 } |
144 | 144 |
145 void ManagedModeInterstitial::DispatchContinueRequest(bool continue_request) { | 145 void ManagedModeInterstitial::DispatchContinueRequest(bool continue_request) { |
146 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 146 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
147 base::Bind(callback_, continue_request)); | 147 base::Bind(callback_, continue_request)); |
148 } | 148 } |
149 | 149 |
OLD | NEW |