OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/personal_options_handler.h" | 5 #include "chrome/browser/dom_ui/personal_options_handler.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | |
9 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
10 #include "base/callback.h" | 9 #include "base/callback.h" |
11 #include "base/path_service.h" | 10 #include "base/path_service.h" |
12 #include "base/stl_util-inl.h" | 11 #include "base/stl_util-inl.h" |
13 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
14 #include "base/values.h" | 13 #include "base/values.h" |
15 #include "chrome/common/notification_service.h" | 14 #include "chrome/common/notification_service.h" |
16 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
17 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
18 #include "chrome/browser/profile.h" | 17 #include "chrome/browser/profile.h" |
(...skipping 13 matching lines...) Expand all Loading... |
32 | 31 |
33 void PersonalOptionsHandler::GetLocalizedValues( | 32 void PersonalOptionsHandler::GetLocalizedValues( |
34 DictionaryValue* localized_strings) { | 33 DictionaryValue* localized_strings) { |
35 FilePath user_data_dir; | 34 FilePath user_data_dir; |
36 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); | 35 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |
37 ProfileManager* profile_manager = g_browser_process->profile_manager(); | 36 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
38 Profile* profile = profile_manager->GetDefaultProfile(user_data_dir); | 37 Profile* profile = profile_manager->GetDefaultProfile(user_data_dir); |
39 ProfileSyncService* service = profile->GetProfileSyncService(); | 38 ProfileSyncService* service = profile->GetProfileSyncService(); |
40 | 39 |
41 DCHECK(localized_strings); | 40 DCHECK(localized_strings); |
42 //Personal Stuff page | 41 // Personal Stuff page |
43 localized_strings->SetString(L"sync_section", | 42 localized_strings->SetString(L"sync_section", |
44 l10n_util::GetString(IDS_SYNC_OPTIONS_GROUP_NAME)); | 43 l10n_util::GetString(IDS_SYNC_OPTIONS_GROUP_NAME)); |
45 localized_strings->SetString(L"sync_not_setup_info", | 44 localized_strings->SetString(L"sync_not_setup_info", |
46 l10n_util::GetStringF(IDS_SYNC_NOT_SET_UP_INFO, | 45 l10n_util::GetStringF(IDS_SYNC_NOT_SET_UP_INFO, |
47 l10n_util::GetString(IDS_PRODUCT_NAME))); | 46 l10n_util::GetString(IDS_PRODUCT_NAME))); |
48 localized_strings->SetString(L"start_sync", | 47 localized_strings->SetString(L"start_sync", |
49 l10n_util::GetString(IDS_SYNC_START_SYNC_BUTTON_LABEL)); | 48 l10n_util::GetString(IDS_SYNC_START_SYNC_BUTTON_LABEL)); |
50 localized_strings->SetString(L"synced_to_user_with_time", | 49 localized_strings->SetString(L"synced_to_user_with_time", |
51 l10n_util::GetStringF(IDS_SYNC_ACCOUNT_SYNCED_TO_USER_WITH_TIME, | 50 l10n_util::GetStringF(IDS_SYNC_ACCOUNT_SYNCED_TO_USER_WITH_TIME, |
52 UTF16ToWide(service->GetAuthenticatedUsername()), | 51 UTF16ToWide(service->GetAuthenticatedUsername()), |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 localized_strings->SetString(L"themes", | 95 localized_strings->SetString(L"themes", |
97 l10n_util::GetString(IDS_THEMES_GROUP_NAME)); | 96 l10n_util::GetString(IDS_THEMES_GROUP_NAME)); |
98 localized_strings->SetString(L"themes_reset", | 97 localized_strings->SetString(L"themes_reset", |
99 l10n_util::GetString(IDS_THEMES_RESET_BUTTON)); | 98 l10n_util::GetString(IDS_THEMES_RESET_BUTTON)); |
100 localized_strings->SetString(L"themes_gallery", | 99 localized_strings->SetString(L"themes_gallery", |
101 l10n_util::GetString(IDS_THEMES_GALLERY_BUTTON)); | 100 l10n_util::GetString(IDS_THEMES_GALLERY_BUTTON)); |
102 localized_strings->SetString(L"themes_default", | 101 localized_strings->SetString(L"themes_default", |
103 l10n_util::GetString(IDS_THEMES_DEFAULT_THEME_LABEL)); | 102 l10n_util::GetString(IDS_THEMES_DEFAULT_THEME_LABEL)); |
104 #endif | 103 #endif |
105 } | 104 } |
OLD | NEW |