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

Side by Side Diff: chrome/browser/ui/webui/options/personal_options_handler.cc

Issue 7977029: [Sync Setup UI] String changes. "Sync" -> "Sign In" and others. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/options/personal_options_handler.h" 5 #include "chrome/browser/ui/webui/options/personal_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/stl_util.h" 13 #include "base/stl_util.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "base/value_conversions.h" 16 #include "base/value_conversions.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "build/build_config.h" 18 #include "build/build_config.h"
19 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/google/google_util.h"
20 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
21 #include "chrome/browser/profiles/profile_info_cache.h" 22 #include "chrome/browser/profiles/profile_info_cache.h"
22 #include "chrome/browser/profiles/profile_manager.h" 23 #include "chrome/browser/profiles/profile_manager.h"
23 #include "chrome/browser/sync/profile_sync_service.h" 24 #include "chrome/browser/sync/profile_sync_service.h"
24 #include "chrome/browser/sync/sync_setup_flow.h" 25 #include "chrome/browser/sync/sync_setup_flow.h"
25 #include "chrome/browser/sync/sync_ui_util.h" 26 #include "chrome/browser/sync/sync_ui_util.h"
26 #include "chrome/browser/themes/theme_service.h" 27 #include "chrome/browser/themes/theme_service.h"
27 #include "chrome/browser/themes/theme_service_factory.h" 28 #include "chrome/browser/themes/theme_service_factory.h"
28 #include "chrome/common/chrome_notification_types.h" 29 #include "chrome/common/chrome_notification_types.h"
29 #include "chrome/common/chrome_paths.h" 30 #include "chrome/common/chrome_paths.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 DCHECK(localized_strings); 72 DCHECK(localized_strings);
72 73
73 RegisterTitle(localized_strings, "personalPage", 74 RegisterTitle(localized_strings, "personalPage",
74 IDS_OPTIONS_CONTENT_TAB_LABEL); 75 IDS_OPTIONS_CONTENT_TAB_LABEL);
75 76
76 77
77 localized_strings->SetString( 78 localized_strings->SetString(
78 "syncOverview", 79 "syncOverview",
79 l10n_util::GetStringFUTF16(IDS_SYNC_OVERVIEW, 80 l10n_util::GetStringFUTF16(IDS_SYNC_OVERVIEW,
80 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 81 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
81 localized_strings->SetString(
82 "syncFurtherOverview",
83 l10n_util::GetStringUTF16(IDS_SYNC_FURTHER_OVERVIEW));
84 localized_strings->SetString("syncSection", 82 localized_strings->SetString("syncSection",
85 l10n_util::GetStringUTF16(IDS_SYNC_OPTIONS_GROUP_NAME)); 83 l10n_util::GetStringUTF16(IDS_SYNC_OPTIONS_GROUP_NAME));
86 localized_strings->SetString("customizeSync", 84 localized_strings->SetString("customizeSync",
87 l10n_util::GetStringUTF16(IDS_SYNC_CUSTOMIZE_BUTTON_LABEL)); 85 l10n_util::GetStringUTF16(IDS_SYNC_CUSTOMIZE_BUTTON_LABEL));
86 localized_strings->SetString("syncLearnMoreURL",
87 google_util::StringAppendGoogleLocaleParam(chrome::kSyncLearnMoreURL));
88 88
89 localized_strings->SetString("profiles", 89 localized_strings->SetString("profiles",
90 l10n_util::GetStringUTF16(IDS_PROFILES_OPTIONS_GROUP_NAME)); 90 l10n_util::GetStringUTF16(IDS_PROFILES_OPTIONS_GROUP_NAME));
91 localized_strings->SetString("profilesCreate", 91 localized_strings->SetString("profilesCreate",
92 l10n_util::GetStringUTF16(IDS_PROFILES_CREATE_BUTTON_LABEL)); 92 l10n_util::GetStringUTF16(IDS_PROFILES_CREATE_BUTTON_LABEL));
93 localized_strings->SetString("profilesManage", 93 localized_strings->SetString("profilesManage",
94 l10n_util::GetStringUTF16(IDS_PROFILES_MANAGE_BUTTON_LABEL)); 94 l10n_util::GetStringUTF16(IDS_PROFILES_MANAGE_BUTTON_LABEL));
95 localized_strings->SetString("profilesDelete", 95 localized_strings->SetString("profilesDelete",
96 l10n_util::GetStringUTF16(IDS_PROFILES_DELETE_BUTTON_LABEL)); 96 l10n_util::GetStringUTF16(IDS_PROFILES_DELETE_BUTTON_LABEL));
97 localized_strings->SetString("profilesListItemCurrent", 97 localized_strings->SetString("profilesListItemCurrent",
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 is_start_stop_button_visible = true; 252 is_start_stop_button_visible = true;
253 #endif // defined(OS_CHROMEOS) 253 #endif // defined(OS_CHROMEOS)
254 is_start_stop_button_enabled = !managed; 254 is_start_stop_button_enabled = !managed;
255 } else if (service->SetupInProgress()) { 255 } else if (service->SetupInProgress()) {
256 start_stop_button_label = 256 start_stop_button_label =
257 l10n_util::GetStringUTF16(IDS_SYNC_NTP_SETUP_IN_PROGRESS); 257 l10n_util::GetStringUTF16(IDS_SYNC_NTP_SETUP_IN_PROGRESS);
258 is_start_stop_button_visible = true; 258 is_start_stop_button_visible = true;
259 is_start_stop_button_enabled = false; 259 is_start_stop_button_enabled = false;
260 } else { 260 } else {
261 start_stop_button_label = 261 start_stop_button_label =
262 l10n_util::GetStringUTF16(IDS_SYNC_START_SYNC_BUTTON_LABEL); 262 l10n_util::GetStringFUTF16(IDS_SYNC_START_SYNC_BUTTON_LABEL,
263 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
263 is_start_stop_button_visible = true; 264 is_start_stop_button_visible = true;
264 is_start_stop_button_enabled = !managed; 265 is_start_stop_button_enabled = !managed;
265 } 266 }
266 267
267 scoped_ptr<Value> completed(Value::CreateBooleanValue(sync_setup_completed)); 268 scoped_ptr<Value> completed(Value::CreateBooleanValue(sync_setup_completed));
268 web_ui_->CallJavascriptFunction("PersonalOptions.setSyncSetupCompleted", 269 web_ui_->CallJavascriptFunction("PersonalOptions.setSyncSetupCompleted",
269 *completed); 270 *completed);
270 271
271 scoped_ptr<Value> label(Value::CreateStringValue(status_label)); 272 scoped_ptr<Value> label(Value::CreateStringValue(status_label));
272 web_ui_->CallJavascriptFunction("PersonalOptions.setSyncStatus", *label); 273 web_ui_->CallJavascriptFunction("PersonalOptions.setSyncStatus", *label);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 profile_info_list.Append(profile_value); 397 profile_info_list.Append(profile_value);
397 } 398 }
398 399
399 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", 400 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo",
400 profile_info_list); 401 profile_info_list);
401 } 402 }
402 403
403 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { 404 void PersonalOptionsHandler::CreateProfile(const ListValue* args) {
404 ProfileManager::CreateMultiProfileAsync(); 405 ProfileManager::CreateMultiProfileAsync();
405 } 406 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/personal_options.html ('k') | chrome/browser/ui/webui/options/stop_syncing_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698