| Index: chrome/browser/dom_ui/personal_options_handler.cc
|
| ===================================================================
|
| --- chrome/browser/dom_ui/personal_options_handler.cc (revision 52809)
|
| +++ chrome/browser/dom_ui/personal_options_handler.cc (working copy)
|
| @@ -5,24 +5,10 @@
|
| #include "chrome/browser/dom_ui/personal_options_handler.h"
|
|
|
| #include "app/l10n_util.h"
|
| -#include "app/resource_bundle.h"
|
| #include "base/basictypes.h"
|
| -#include "base/callback.h"
|
| -#include "base/path_service.h"
|
| -#include "base/stl_util-inl.h"
|
| -#include "base/utf_string_conversions.h"
|
| #include "base/values.h"
|
| -#include "chrome/common/notification_service.h"
|
| -#include "chrome/common/chrome_paths.h"
|
| -#include "chrome/browser/browser_process.h"
|
| -#include "chrome/browser/profile.h"
|
| -#include "chrome/browser/profile_manager.h"
|
| -#include "chrome/browser/sync/profile_sync_service.h"
|
| -#include "grit/browser_resources.h"
|
| #include "grit/chromium_strings.h"
|
| #include "grit/generated_resources.h"
|
| -#include "grit/locale_settings.h"
|
| -#include "grit/theme_resources.h"
|
|
|
| PersonalOptionsHandler::PersonalOptionsHandler() {
|
| }
|
| @@ -32,74 +18,43 @@
|
|
|
| void PersonalOptionsHandler::GetLocalizedValues(
|
| DictionaryValue* localized_strings) {
|
| - FilePath user_data_dir;
|
| - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
|
| - ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| - Profile* profile = profile_manager->GetDefaultProfile(user_data_dir);
|
| - ProfileSyncService* service = profile->GetProfileSyncService();
|
| -
|
| DCHECK(localized_strings);
|
| - //Personal Stuff page
|
| - localized_strings->SetString(L"sync_section",
|
| - l10n_util::GetString(IDS_SYNC_OPTIONS_GROUP_NAME));
|
| - localized_strings->SetString(L"sync_not_setup_info",
|
| - l10n_util::GetStringF(IDS_SYNC_NOT_SET_UP_INFO,
|
| - l10n_util::GetString(IDS_PRODUCT_NAME)));
|
| - localized_strings->SetString(L"start_sync",
|
| - l10n_util::GetString(IDS_SYNC_START_SYNC_BUTTON_LABEL));
|
| - localized_strings->SetString(L"synced_to_user_with_time",
|
| - l10n_util::GetStringF(IDS_SYNC_ACCOUNT_SYNCED_TO_USER_WITH_TIME,
|
| - UTF16ToWide(service->GetAuthenticatedUsername()),
|
| - service->GetLastSyncedTimeString()));
|
| - localized_strings->SetString(L"sync_customize",
|
| - l10n_util::GetString(IDS_SYNC_CUSTOMIZE_BUTTON_LABEL));
|
| - localized_strings->SetString(L"stop_sync",
|
| - l10n_util::GetString(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL));
|
| -
|
| - localized_strings->SetString(L"passwords",
|
| + localized_strings->SetString(L"passwordsGroupName",
|
| l10n_util::GetString(IDS_OPTIONS_PASSWORDS_GROUP_NAME));
|
| - localized_strings->SetString(L"passwords_asktosave",
|
| + localized_strings->SetString(L"passwordsAskToSave",
|
| l10n_util::GetString(IDS_OPTIONS_PASSWORDS_ASKTOSAVE));
|
| - localized_strings->SetString(L"passwords_neversave",
|
| + localized_strings->SetString(L"passwordsNeverSave",
|
| l10n_util::GetString(IDS_OPTIONS_PASSWORDS_NEVERSAVE));
|
| - localized_strings->SetString(L"showpasswords",
|
| + localized_strings->SetString(L"passwordShowPasswords",
|
| l10n_util::GetString(IDS_OPTIONS_PASSWORDS_SHOWPASSWORDS));
|
| -
|
| - localized_strings->SetString(L"autofill",
|
| + localized_strings->SetString(L"autoFillSettingWindowsGroupName",
|
| l10n_util::GetString(IDS_AUTOFILL_SETTING_WINDOWS_GROUP_NAME));
|
| - localized_strings->SetString(L"autofill_enable",
|
| + localized_strings->SetString(L"autoFillEnable",
|
| l10n_util::GetString(IDS_OPTIONS_AUTOFILL_ENABLE));
|
| - localized_strings->SetString(L"autofill_disable",
|
| + localized_strings->SetString(L"autoFillDisable",
|
| l10n_util::GetString(IDS_OPTIONS_AUTOFILL_DISABLE));
|
| - localized_strings->SetString(L"autofill_options",
|
| - l10n_util::GetString(IDS_AUTOFILL_OPTIONS));
|
| -
|
| - localized_strings->SetString(L"browsing_data",
|
| - l10n_util::GetString(IDS_OPTIONS_BROWSING_DATA_GROUP_NAME));
|
| - localized_strings->SetString(L"import_data",
|
| - l10n_util::GetString(IDS_OPTIONS_IMPORT_DATA_BUTTON));
|
| -
|
| + localized_strings->SetString(L"themesGroupName",
|
| + l10n_util::GetString(IDS_THEMES_GROUP_NAME));
|
| #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_OPENBSD)
|
| - localized_strings->SetString(L"appearance",
|
| + localized_strings->SetString(L"appearanceGroupName",
|
| l10n_util::GetString(IDS_APPEARANCE_GROUP_NAME));
|
| - localized_strings->SetString(L"themes_GTK_button",
|
| + localized_strings->SetString(L"themesGTKButton",
|
| l10n_util::GetString(IDS_THEMES_GTK_BUTTON));
|
| - localized_strings->SetString(L"themes_set_classic",
|
| + localized_strings->SetString(L"themesSetClassic",
|
| l10n_util::GetString(IDS_THEMES_SET_CLASSIC));
|
| - localized_strings->SetString(L"showWindow_decorations_radio",
|
| + localized_strings->SetString(L"showWindowDecorationsRadio",
|
| l10n_util::GetString(IDS_SHOW_WINDOW_DECORATIONS_RADIO));
|
| - localized_strings->SetString(L"hideWindow_decorations_radio",
|
| + localized_strings->SetString(L"hideWindowDecorationsRadio",
|
| l10n_util::GetString(IDS_HIDE_WINDOW_DECORATIONS_RADIO));
|
| - localized_strings->SetString(L"themes_gallery",
|
| - l10n_util::GetString(IDS_THEMES_GALLERY_BUTTON));
|
| -#else
|
| - localized_strings->SetString(L"themes",
|
| - l10n_util::GetString(IDS_THEMES_GROUP_NAME));
|
| - localized_strings->SetString(L"themes_reset",
|
| +#endif
|
| + localized_strings->SetString(L"themesResetButton",
|
| l10n_util::GetString(IDS_THEMES_RESET_BUTTON));
|
| - localized_strings->SetString(L"themes_gallery",
|
| - l10n_util::GetString(IDS_THEMES_GALLERY_BUTTON));
|
| - localized_strings->SetString(L"themes_default",
|
| + localized_strings->SetString(L"themesDefaultThemeLabel",
|
| l10n_util::GetString(IDS_THEMES_DEFAULT_THEME_LABEL));
|
| -#endif
|
| + localized_strings->SetString(L"themesGalleryButton",
|
| + l10n_util::GetString(IDS_THEMES_GALLERY_BUTTON));
|
| + localized_strings->SetString(L"browsingDataGroupName",
|
| + l10n_util::GetString(IDS_OPTIONS_BROWSING_DATA_GROUP_NAME));
|
| + localized_strings->SetString(L"importDataButton",
|
| + l10n_util::GetString(IDS_OPTIONS_IMPORT_DATA_BUTTON));
|
| }
|
|
|