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

Unified Diff: chrome/browser/dom_ui/new_tab_page_sync_handler.cc

Issue 462011: Notify user that Chrome is already synced if promo banner "sync me" link is c... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « no previous file | chrome/browser/dom_ui/ntp_resource_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/new_tab_page_sync_handler.cc
===================================================================
--- chrome/browser/dom_ui/new_tab_page_sync_handler.cc (revision 33650)
+++ chrome/browser/dom_ui/new_tab_page_sync_handler.cc (working copy)
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/profile.h"
@@ -148,8 +149,11 @@
DCHECK(!waiting_for_initial_page_load_);
DCHECK(sync_service_);
if (sync_service_->HasSyncSetupCompleted()) {
- // User clicked the 'Login again' link to re-authenticate.
- sync_service_->ShowLoginDialog();
+ DictionaryValue value;
+ value.SetString(L"syncEnabledMessage",
+ l10n_util::GetStringF(IDS_SYNC_NTP_SYNCED_TO,
+ UTF16ToWide(sync_service_->GetAuthenticatedUsername())));
+ dom_ui_->CallJavascriptFunction(L"syncAlreadyEnabled", value);
} else {
// User clicked the 'Start now' link to begin syncing.
ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_NTP);
« no previous file with comments | « no previous file | chrome/browser/dom_ui/ntp_resource_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698