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

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

Issue 495003003: Supervised user interstitial: Handle missing custodian profile URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | 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 17baddf27f49f5c33791d9819eb1f5b871b4df8a..9bbe704cb0b8311496cbd0f4b761e333f86429a6 100644
--- a/chrome/browser/supervised_user/supervised_user_interstitial.cc
+++ b/chrome/browser/supervised_user/supervised_user_interstitial.cc
@@ -150,6 +150,9 @@ std::string SupervisedUserInterstitial::GetHTMLContents() {
GURL profile_url = GURL(profile->GetPrefs()->GetString(
Bernhard Bauer 2014/08/21 14:48:46 Could we rename this to base_url, now that it migh
Marc Treib 2014/08/21 15:59:08 Done.
prefs::kSupervisedUserCustodianProfileURL));
+ if (!profile_url.is_valid())
+ profile_url = GURL("https://dummy.url");
+ DCHECK(profile_url.is_valid());
std::string profile_image_url = profile->GetPrefs()->GetString(
prefs::kSupervisedUserCustodianProfileImageURL);
strings.SetString("avatarURL1x", BuildAvatarImageUrl(profile_image_url,
@@ -161,6 +164,9 @@ std::string SupervisedUserInterstitial::GetHTMLContents() {
GURL profile_url2 = GURL(profile->GetPrefs()->GetString(
prefs::kSupervisedUserSecondCustodianProfileURL));
+ if (!profile_url2.is_valid())
+ profile_url2 = GURL("https://dummy.url");
+ DCHECK(profile_url2.is_valid());
std::string profile_image_url2 = profile->GetPrefs()->GetString(
prefs::kSupervisedUserSecondCustodianProfileImageURL);
strings.SetString("secondAvatarURL1x", BuildAvatarImageUrl(profile_image_url2,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698