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

Side by Side Diff: chrome/browser/dom_ui/personal_options_handler.cc

Issue 2819046: Make the personal stuff page viewable. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Remove the two old line for sync in gypi Created 10 years, 5 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
« no previous file with comments | « chrome/browser/dom_ui/options_ui.cc ('k') | chrome/browser/dom_ui/sync_options_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
8 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h"
11 #include "base/path_service.h"
12 #include "base/stl_util-inl.h"
13 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/common/notification_service.h"
16 #include "chrome/common/chrome_paths.h"
17 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/profile.h"
19 #include "chrome/browser/profile_manager.h"
20 #include "chrome/browser/sync/profile_sync_service.h"
21 #include "grit/browser_resources.h"
10 #include "grit/chromium_strings.h" 22 #include "grit/chromium_strings.h"
11 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
24 #include "grit/locale_settings.h"
25 #include "grit/theme_resources.h"
12 26
13 PersonalOptionsHandler::PersonalOptionsHandler() { 27 PersonalOptionsHandler::PersonalOptionsHandler() {
14 } 28 }
15 29
16 PersonalOptionsHandler::~PersonalOptionsHandler() { 30 PersonalOptionsHandler::~PersonalOptionsHandler() {
17 } 31 }
18 32
19 void PersonalOptionsHandler::GetLocalizedValues( 33 void PersonalOptionsHandler::GetLocalizedValues(
20 DictionaryValue* localized_strings) { 34 DictionaryValue* localized_strings) {
35 FilePath user_data_dir;
36 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
37 ProfileManager* profile_manager = g_browser_process->profile_manager();
38 Profile* profile = profile_manager->GetDefaultProfile(user_data_dir);
39 ProfileSyncService* service = profile->GetProfileSyncService();
40
21 DCHECK(localized_strings); 41 DCHECK(localized_strings);
22 localized_strings->SetString(L"passwordsGroupName", 42 //Personal Stuff page
43 localized_strings->SetString(L"sync_section",
44 l10n_util::GetString(IDS_SYNC_OPTIONS_GROUP_NAME));
45 localized_strings->SetString(L"sync_not_setup_info",
46 l10n_util::GetStringF(IDS_SYNC_NOT_SET_UP_INFO,
47 l10n_util::GetString(IDS_PRODUCT_NAME)));
48 localized_strings->SetString(L"start_sync",
49 l10n_util::GetString(IDS_SYNC_START_SYNC_BUTTON_LABEL));
50 localized_strings->SetString(L"synced_to_user_with_time",
51 l10n_util::GetStringF(IDS_SYNC_ACCOUNT_SYNCED_TO_USER_WITH_TIME,
52 UTF16ToWide(service->GetAuthenticatedUsername()),
53 service->GetLastSyncedTimeString()));
54 localized_strings->SetString(L"sync_customize",
55 l10n_util::GetString(IDS_SYNC_CUSTOMIZE_BUTTON_LABEL));
56 localized_strings->SetString(L"stop_sync",
57 l10n_util::GetString(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL));
58
59 localized_strings->SetString(L"passwords",
23 l10n_util::GetString(IDS_OPTIONS_PASSWORDS_GROUP_NAME)); 60 l10n_util::GetString(IDS_OPTIONS_PASSWORDS_GROUP_NAME));
24 localized_strings->SetString(L"passwordsAskToSave", 61 localized_strings->SetString(L"passwords_asktosave",
25 l10n_util::GetString(IDS_OPTIONS_PASSWORDS_ASKTOSAVE)); 62 l10n_util::GetString(IDS_OPTIONS_PASSWORDS_ASKTOSAVE));
26 localized_strings->SetString(L"passwordsNeverSave", 63 localized_strings->SetString(L"passwords_neversave",
27 l10n_util::GetString(IDS_OPTIONS_PASSWORDS_NEVERSAVE)); 64 l10n_util::GetString(IDS_OPTIONS_PASSWORDS_NEVERSAVE));
28 localized_strings->SetString(L"passwordShowPasswords", 65 localized_strings->SetString(L"showpasswords",
29 l10n_util::GetString(IDS_OPTIONS_PASSWORDS_SHOWPASSWORDS)); 66 l10n_util::GetString(IDS_OPTIONS_PASSWORDS_SHOWPASSWORDS));
30 localized_strings->SetString(L"autoFillSettingWindowsGroupName", 67
68 localized_strings->SetString(L"autofill",
31 l10n_util::GetString(IDS_AUTOFILL_SETTING_WINDOWS_GROUP_NAME)); 69 l10n_util::GetString(IDS_AUTOFILL_SETTING_WINDOWS_GROUP_NAME));
32 localized_strings->SetString(L"autoFillEnable", 70 localized_strings->SetString(L"autofill_enable",
33 l10n_util::GetString(IDS_OPTIONS_AUTOFILL_ENABLE)); 71 l10n_util::GetString(IDS_OPTIONS_AUTOFILL_ENABLE));
34 localized_strings->SetString(L"autoFillDisable", 72 localized_strings->SetString(L"autofill_disable",
35 l10n_util::GetString(IDS_OPTIONS_AUTOFILL_DISABLE)); 73 l10n_util::GetString(IDS_OPTIONS_AUTOFILL_DISABLE));
36 localized_strings->SetString(L"themesGroupName", 74 localized_strings->SetString(L"autofill_options",
75 l10n_util::GetString(IDS_AUTOFILL_OPTIONS));
76
77 localized_strings->SetString(L"browsing_data",
78 l10n_util::GetString(IDS_OPTIONS_BROWSING_DATA_GROUP_NAME));
79 localized_strings->SetString(L"import_data",
80 l10n_util::GetString(IDS_OPTIONS_IMPORT_DATA_BUTTON));
81
82 #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_OPENBSD)
83 localized_strings->SetString(L"appearance",
84 l10n_util::GetString(IDS_APPEARANCE_GROUP_NAME));
85 localized_strings->SetString(L"themes_GTK_button",
86 l10n_util::GetString(IDS_THEMES_GTK_BUTTON));
87 localized_strings->SetString(L"themes_set_classic",
88 l10n_util::GetString(IDS_THEMES_SET_CLASSIC));
89 localized_strings->SetString(L"showWindow_decorations_radio",
90 l10n_util::GetString(IDS_SHOW_WINDOW_DECORATIONS_RADIO));
91 localized_strings->SetString(L"hideWindow_decorations_radio",
92 l10n_util::GetString(IDS_HIDE_WINDOW_DECORATIONS_RADIO));
93 localized_strings->SetString(L"themes_gallery",
94 l10n_util::GetString(IDS_THEMES_GALLERY_BUTTON));
95 #else
96 localized_strings->SetString(L"themes",
37 l10n_util::GetString(IDS_THEMES_GROUP_NAME)); 97 l10n_util::GetString(IDS_THEMES_GROUP_NAME));
38 #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) 98 localized_strings->SetString(L"themes_reset",
39 localized_strings->SetString(L"appearanceGroupName", 99 l10n_util::GetString(IDS_THEMES_RESET_BUTTON));
40 l10n_util::GetString(IDS_APPEARANCE_GROUP_NAME)); 100 localized_strings->SetString(L"themes_gallery",
41 localized_strings->SetString(L"themesGTKButton", 101 l10n_util::GetString(IDS_THEMES_GALLERY_BUTTON));
42 l10n_util::GetString(IDS_THEMES_GTK_BUTTON)); 102 localized_strings->SetString(L"themes_default",
43 localized_strings->SetString(L"themesSetClassic", 103 l10n_util::GetString(IDS_THEMES_DEFAULT_THEME_LABEL));
44 l10n_util::GetString(IDS_THEMES_SET_CLASSIC));
45 localized_strings->SetString(L"showWindowDecorationsRadio",
46 l10n_util::GetString(IDS_SHOW_WINDOW_DECORATIONS_RADIO));
47 localized_strings->SetString(L"hideWindowDecorationsRadio",
48 l10n_util::GetString(IDS_HIDE_WINDOW_DECORATIONS_RADIO));
49 #endif 104 #endif
50 localized_strings->SetString(L"themesResetButton",
51 l10n_util::GetString(IDS_THEMES_RESET_BUTTON));
52 localized_strings->SetString(L"themesDefaultThemeLabel",
53 l10n_util::GetString(IDS_THEMES_DEFAULT_THEME_LABEL));
54 localized_strings->SetString(L"themesGalleryButton",
55 l10n_util::GetString(IDS_THEMES_GALLERY_BUTTON));
56 localized_strings->SetString(L"browsingDataGroupName",
57 l10n_util::GetString(IDS_OPTIONS_BROWSING_DATA_GROUP_NAME));
58 localized_strings->SetString(L"importDataButton",
59 l10n_util::GetString(IDS_OPTIONS_IMPORT_DATA_BUTTON));
60 } 105 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/options_ui.cc ('k') | chrome/browser/dom_ui/sync_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698