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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_interstitial.cc

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: . Created 6 years, 2 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
OLDNEW
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 strings.SetString( 223 strings.SetString(
224 "requestSentMessage", 224 "requestSentMessage",
225 l10n_util::GetStringFUTF16(IDS_BLOCK_INTERSTITIAL_REQUEST_SENT_MESSAGE, 225 l10n_util::GetStringFUTF16(IDS_BLOCK_INTERSTITIAL_REQUEST_SENT_MESSAGE,
226 custodian)); 226 custodian));
227 227
228 webui::SetFontAndTextDirection(&strings); 228 webui::SetFontAndTextDirection(&strings);
229 229
230 base::StringPiece html(ResourceBundle::GetSharedInstance().GetRawDataResource( 230 base::StringPiece html(ResourceBundle::GetSharedInstance().GetRawDataResource(
231 IDR_SUPERVISED_USER_BLOCK_INTERSTITIAL_HTML)); 231 IDR_SUPERVISED_USER_BLOCK_INTERSTITIAL_HTML));
232 232
233 webui::UseVersion2 version;
234 return webui::GetI18nTemplateHtml(html, &strings); 233 return webui::GetI18nTemplateHtml(html, &strings);
235 } 234 }
236 235
237 void SupervisedUserInterstitial::CommandReceived(const std::string& command) { 236 void SupervisedUserInterstitial::CommandReceived(const std::string& command) {
238 // For use in histograms. 237 // For use in histograms.
239 enum Commands { 238 enum Commands {
240 PREVIEW, 239 PREVIEW,
241 BACK, 240 BACK,
242 NTP, 241 NTP,
243 ACCESS_REQUEST, 242 ACCESS_REQUEST,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 void SupervisedUserInterstitial::OnFilteringPrefsChanged() { 300 void SupervisedUserInterstitial::OnFilteringPrefsChanged() {
302 if (ShouldProceed()) 301 if (ShouldProceed())
303 interstitial_page_->Proceed(); 302 interstitial_page_->Proceed();
304 } 303 }
305 304
306 void SupervisedUserInterstitial::DispatchContinueRequest( 305 void SupervisedUserInterstitial::DispatchContinueRequest(
307 bool continue_request) { 306 bool continue_request) {
308 BrowserThread::PostTask( 307 BrowserThread::PostTask(
309 BrowserThread::IO, FROM_HERE, base::Bind(callback_, continue_request)); 308 BrowserThread::IO, FROM_HERE, base::Bind(callback_, continue_request));
310 } 309 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698