OLD | NEW |
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/bind.h" | 10 #include "base/bind.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); | 103 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); |
104 | 104 |
105 localized_strings->SetString("passwords", | 105 localized_strings->SetString("passwords", |
106 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_GROUP_NAME)); | 106 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_GROUP_NAME)); |
107 localized_strings->SetString("passwordsAskToSave", | 107 localized_strings->SetString("passwordsAskToSave", |
108 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_ASKTOSAVE)); | 108 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_ASKTOSAVE)); |
109 localized_strings->SetString("passwordsNeverSave", | 109 localized_strings->SetString("passwordsNeverSave", |
110 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_NEVERSAVE)); | 110 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_NEVERSAVE)); |
111 localized_strings->SetString("manage_passwords", | 111 localized_strings->SetString("manage_passwords", |
112 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MANAGE_PASSWORDS)); | 112 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MANAGE_PASSWORDS)); |
| 113 #if defined(OS_MACOSX) |
| 114 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
| 115 if (profile_manager->GetNumberOfProfiles() > 1) { |
| 116 localized_strings->SetString("macPasswordsWarning", |
| 117 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MAC_WARNING)); |
| 118 } |
| 119 #endif |
113 localized_strings->SetString("autologinEnabled", | 120 localized_strings->SetString("autologinEnabled", |
114 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_AUTOLOGIN)); | 121 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_AUTOLOGIN)); |
115 | 122 |
116 localized_strings->SetString("autofill", | 123 localized_strings->SetString("autofill", |
117 l10n_util::GetStringUTF16(IDS_AUTOFILL_SETTING_WINDOWS_GROUP_NAME)); | 124 l10n_util::GetStringUTF16(IDS_AUTOFILL_SETTING_WINDOWS_GROUP_NAME)); |
118 localized_strings->SetString("autofillEnabled", | 125 localized_strings->SetString("autofillEnabled", |
119 l10n_util::GetStringUTF16(IDS_OPTIONS_AUTOFILL_ENABLE)); | 126 l10n_util::GetStringUTF16(IDS_OPTIONS_AUTOFILL_ENABLE)); |
120 localized_strings->SetString("manageAutofillSettings", | 127 localized_strings->SetString("manageAutofillSettings", |
121 l10n_util::GetStringUTF16(IDS_OPTIONS_MANAGE_AUTOFILL_SETTINGS)); | 128 l10n_util::GetStringUTF16(IDS_OPTIONS_MANAGE_AUTOFILL_SETTINGS)); |
122 | 129 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 profile_info_list.Append(profile_value); | 419 profile_info_list.Append(profile_value); |
413 } | 420 } |
414 | 421 |
415 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", | 422 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", |
416 profile_info_list); | 423 profile_info_list); |
417 } | 424 } |
418 | 425 |
419 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { | 426 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { |
420 ProfileManager::CreateMultiProfileAsync(); | 427 ProfileManager::CreateMultiProfileAsync(); |
421 } | 428 } |
OLD | NEW |