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/supervised_user/supervised_user_interstitial.h" | 5 #include "chrome/browser/supervised_user/supervised_user_interstitial.h" |
6 | 6 |
7 #include "base/memory/weak_ptr.h" | 7 #include "base/memory/weak_ptr.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 strings.SetString( | 209 strings.SetString( |
210 "requestSentMessage", | 210 "requestSentMessage", |
211 l10n_util::GetStringFUTF16(IDS_BLOCK_INTERSTITIAL_REQUEST_SENT_MESSAGE, | 211 l10n_util::GetStringFUTF16(IDS_BLOCK_INTERSTITIAL_REQUEST_SENT_MESSAGE, |
212 custodian)); | 212 custodian)); |
213 | 213 |
214 webui::SetFontAndTextDirection(&strings); | 214 webui::SetFontAndTextDirection(&strings); |
215 | 215 |
216 base::StringPiece html(ResourceBundle::GetSharedInstance().GetRawDataResource( | 216 base::StringPiece html(ResourceBundle::GetSharedInstance().GetRawDataResource( |
217 IDR_SUPERVISED_USER_BLOCK_INTERSTITIAL_HTML)); | 217 IDR_SUPERVISED_USER_BLOCK_INTERSTITIAL_HTML)); |
218 | 218 |
219 webui::UseVersion2 version; | |
220 return webui::GetI18nTemplateHtml(html, &strings); | 219 return webui::GetI18nTemplateHtml(html, &strings); |
221 } | 220 } |
222 | 221 |
223 void SupervisedUserInterstitial::CommandReceived(const std::string& command) { | 222 void SupervisedUserInterstitial::CommandReceived(const std::string& command) { |
224 // For use in histograms. | 223 // For use in histograms. |
225 enum Commands { | 224 enum Commands { |
226 PREVIEW, | 225 PREVIEW, |
227 BACK, | 226 BACK, |
228 NTP, | 227 NTP, |
229 ACCESS_REQUEST, | 228 ACCESS_REQUEST, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 SupervisedUserServiceFactory::GetForProfile(profile_); | 290 SupervisedUserServiceFactory::GetForProfile(profile_); |
292 supervised_user_service->RemoveObserver(this); | 291 supervised_user_service->RemoveObserver(this); |
293 | 292 |
294 BrowserThread::PostTask( | 293 BrowserThread::PostTask( |
295 BrowserThread::IO, FROM_HERE, base::Bind(callback_, continue_request)); | 294 BrowserThread::IO, FROM_HERE, base::Bind(callback_, continue_request)); |
296 | 295 |
297 // After this, the WebContents may be destroyed. Make sure we don't try to use | 296 // After this, the WebContents may be destroyed. Make sure we don't try to use |
298 // it again. | 297 // it again. |
299 web_contents_ = NULL; | 298 web_contents_ = NULL; |
300 } | 299 } |
OLD | NEW |