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

Side by Side Diff: chrome/browser/ui/webui/app_launcher_login_handler.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 (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/ui/webui/app_launcher_login_handler.h" 5 #include "chrome/browser/ui/webui/app_launcher_login_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 : base::UserMetricsAction("Signin_Impression_FromNTP")); 216 : base::UserMetricsAction("Signin_Impression_FromNTP"));
217 // Record that the user was shown the promo. 217 // Record that the user was shown the promo.
218 RecordInHistogram(NTP_SIGN_IN_PROMO_VIEWED); 218 RecordInHistogram(NTP_SIGN_IN_PROMO_VIEWED);
219 } 219 }
220 #endif 220 #endif
221 } 221 }
222 222
223 base::StringValue header_value(header); 223 base::StringValue header_value(header);
224 base::StringValue sub_header_value(sub_header); 224 base::StringValue sub_header_value(sub_header);
225 base::StringValue icon_url_value(icon_url); 225 base::StringValue icon_url_value(icon_url);
226 base::FundamentalValue is_user_signed_in(!username.empty()); 226 base::Value is_user_signed_in(!username.empty());
227 web_ui()->CallJavascriptFunctionUnsafe("ntp.updateLogin", header_value, 227 web_ui()->CallJavascriptFunctionUnsafe("ntp.updateLogin", header_value,
228 sub_header_value, icon_url_value, 228 sub_header_value, icon_url_value,
229 is_user_signed_in); 229 is_user_signed_in);
230 } 230 }
231 231
232 // static 232 // static
233 bool AppLauncherLoginHandler::ShouldShow(Profile* profile) { 233 bool AppLauncherLoginHandler::ShouldShow(Profile* profile) {
234 #if defined(OS_CHROMEOS) 234 #if defined(OS_CHROMEOS)
235 // For now we don't care about showing sync status on Chrome OS. The promo 235 // For now we don't care about showing sync status on Chrome OS. The promo
236 // UI and the avatar menu don't exist on that platform. 236 // UI and the avatar menu don't exist on that platform.
(...skipping 17 matching lines...) Expand all
254 values->SetString("login_status_message", message); 254 values->SetString("login_status_message", message);
255 values->SetString("login_status_url", 255 values->SetString("login_status_url",
256 hide_sync ? std::string() : chrome::kSyncLearnMoreURL); 256 hide_sync ? std::string() : chrome::kSyncLearnMoreURL);
257 values->SetString("login_status_advanced", 257 values->SetString("login_status_advanced",
258 hide_sync ? base::string16() : 258 hide_sync ? base::string16() :
259 l10n_util::GetStringUTF16(IDS_SYNC_PROMO_NTP_BUBBLE_ADVANCED)); 259 l10n_util::GetStringUTF16(IDS_SYNC_PROMO_NTP_BUBBLE_ADVANCED));
260 values->SetString("login_status_dismiss", 260 values->SetString("login_status_dismiss",
261 hide_sync ? base::string16() : 261 hide_sync ? base::string16() :
262 l10n_util::GetStringUTF16(IDS_SYNC_PROMO_NTP_BUBBLE_OK)); 262 l10n_util::GetStringUTF16(IDS_SYNC_PROMO_NTP_BUBBLE_OK));
263 } 263 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc ('k') | chrome/browser/ui/webui/bidi_checker_web_ui_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698