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

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

Issue 9225053: Add a blocking version of the sync promo dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 10 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 | Annotate | Revision Log
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/sync_setup_handler2.h" 5 #include "chrome/browser/ui/webui/sync_setup_handler2.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 "passphraseEncryptionMessage", 219 "passphraseEncryptionMessage",
220 GetStringFUTF16(IDS_SYNC_PASSPHRASE_ENCRYPTION_MESSAGE, product_name)); 220 GetStringFUTF16(IDS_SYNC_PASSPHRASE_ENCRYPTION_MESSAGE, product_name));
221 localized_strings->SetString( 221 localized_strings->SetString(
222 "passphraseRecover", 222 "passphraseRecover",
223 GetStringFUTF16(IDS_SYNC_PASSPHRASE_RECOVER, 223 GetStringFUTF16(IDS_SYNC_PASSPHRASE_RECOVER,
224 ASCIIToUTF16(google_util::StringAppendGoogleLocaleParam( 224 ASCIIToUTF16(google_util::StringAppendGoogleLocaleParam(
225 chrome::kSyncGoogleDashboardURL)))); 225 chrome::kSyncGoogleDashboardURL))));
226 226
227 bool is_launch_page = web_ui && SyncPromoUI::GetIsLaunchPageForSyncPromoURL( 227 bool is_launch_page = web_ui && SyncPromoUI::GetIsLaunchPageForSyncPromoURL(
228 web_ui->GetWebContents()->GetURL()); 228 web_ui->GetWebContents()->GetURL());
229 int title_id = is_launch_page ? IDS_SYNC_PROMO_TITLE : 229 int title_id = is_launch_page ? IDS_SYNC_PROMO_TITLE_SHORT :
230 IDS_SYNC_PROMO_TITLE_EXISTING_USER; 230 IDS_SYNC_PROMO_TITLE_EXISTING_USER;
231 string16 short_product_name(GetStringUTF16(IDS_SHORT_PRODUCT_NAME)); 231 string16 short_product_name(GetStringUTF16(IDS_SHORT_PRODUCT_NAME));
232 localized_strings->SetString( 232 localized_strings->SetString(
233 "promoTitle", GetStringFUTF16(title_id, short_product_name)); 233 "promoTitle", GetStringFUTF16(title_id, short_product_name));
234 234
235 localized_strings->SetString( 235 localized_strings->SetString(
236 "promoMessageTitle", 236 "promoMessageTitle",
237 GetStringFUTF16(IDS_SYNC_PROMO_MESSAGE_TITLE, short_product_name)); 237 GetStringFUTF16(IDS_SYNC_PROMO_MESSAGE_TITLE, short_product_name));
238 localized_strings->SetString( 238 localized_strings->SetString(
239 "syncEverythingHelpURL", chrome::kSyncEverythingLearnMoreURL); 239 "syncEverythingHelpURL", chrome::kSyncEverythingLearnMoreURL);
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 665
666 void SyncSetupHandler2::ShowLoginErrorMessage(const string16& error_message) { 666 void SyncSetupHandler2::ShowLoginErrorMessage(const string16& error_message) {
667 DCHECK(flow_); 667 DCHECK(flow_);
668 DictionaryValue args; 668 DictionaryValue args;
669 flow_->GetArgsForGaiaLogin(&args); 669 flow_->GetArgsForGaiaLogin(&args);
670 args.SetString("error_message", error_message); 670 args.SetString("error_message", error_message);
671 ShowGaiaLogin(args); 671 ShowGaiaLogin(args);
672 } 672 }
673 673
674 } // namespace options2 674 } // namespace options2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698