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

Unified Diff: chrome/browser/supervised_user/supervised_user_interstitial.cc

Issue 1539653002: Revert of Supervised user web restrictions content provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_interstitial.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/supervised_user/supervised_user_interstitial.cc
diff --git a/chrome/browser/supervised_user/supervised_user_interstitial.cc b/chrome/browser/supervised_user/supervised_user_interstitial.cc
index f53271c746d6c7004688c24761863708a1842fb4..510c783de2277d7a9ead4c8ff8d31271d9fadf46 100644
--- a/chrome/browser/supervised_user/supervised_user_interstitial.cc
+++ b/chrome/browser/supervised_user/supervised_user_interstitial.cc
@@ -195,35 +195,32 @@
return true;
}
-// static
-std::string SupervisedUserInterstitial::GetHTMLContents(
- Profile* profile,
- SupervisedUserURLFilter::FilteringBehaviorReason reason) {
+std::string SupervisedUserInterstitial::GetHTMLContents() {
base::DictionaryValue strings;
strings.SetString("blockPageTitle",
l10n_util::GetStringUTF16(IDS_BLOCK_INTERSTITIAL_TITLE));
SupervisedUserService* supervised_user_service =
- SupervisedUserServiceFactory::GetForProfile(profile);
+ SupervisedUserServiceFactory::GetForProfile(profile_);
bool allow_access_requests = supervised_user_service->AccessRequestsEnabled();
strings.SetBoolean("allowAccessRequests", allow_access_requests);
- std::string profile_image_url = profile->GetPrefs()->GetString(
+ std::string profile_image_url = profile_->GetPrefs()->GetString(
prefs::kSupervisedUserCustodianProfileImageURL);
strings.SetString("avatarURL1x", BuildAvatarImageUrl(profile_image_url,
kAvatarSize1x));
strings.SetString("avatarURL2x", BuildAvatarImageUrl(profile_image_url,
kAvatarSize2x));
- std::string profile_image_url2 = profile->GetPrefs()->GetString(
+ std::string profile_image_url2 = profile_->GetPrefs()->GetString(
prefs::kSupervisedUserSecondCustodianProfileImageURL);
strings.SetString("secondAvatarURL1x", BuildAvatarImageUrl(profile_image_url2,
kAvatarSize1x));
strings.SetString("secondAvatarURL2x", BuildAvatarImageUrl(profile_image_url2,
kAvatarSize2x));
- bool is_child_account = profile->IsChild();
+ bool is_child_account = profile_->IsChild();
base::string16 custodian =
base::UTF8ToUTF16(supervised_user_service->GetCustodianName());
@@ -246,16 +243,15 @@
IDS_BLOCK_INTERSTITIAL_MESSAGE_ACCESS_REQUESTS_DISABLED);
}
strings.SetString("blockPageMessage", block_message);
- strings.SetString(
- "blockReasonMessage",
- is_child_account ? l10n_util::GetStringUTF16(
- SupervisedUserURLFilter::GetBlockMessageID(reason))
- : base::string16());
+ strings.SetString("blockReasonMessage", is_child_account
+ ? l10n_util::GetStringUTF16(
+ SupervisedUserURLFilter::GetBlockMessageID(reason_))
+ : base::string16());
bool show_feedback = false;
#if defined(GOOGLE_CHROME_BUILD)
- show_feedback =
- is_child_account && SupervisedUserURLFilter::ReasonIsAutomatic(reason);
+ show_feedback = is_child_account &&
+ SupervisedUserURLFilter::ReasonIsAutomatic(reason_);
#endif
strings.SetBoolean("showFeedbackLink", show_feedback);
strings.SetString("feedbackLink",
@@ -302,10 +298,6 @@
return webui::GetI18nTemplateHtml(html, &strings);
}
-std::string SupervisedUserInterstitial::GetHTMLContents() {
- return GetHTMLContents(profile_, reason_);
-}
-
void SupervisedUserInterstitial::CommandReceived(const std::string& command) {
// For use in histograms.
enum Commands {
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_interstitial.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698