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

Side by Side Diff: chrome/browser/dom_ui/options_ui.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 | « no previous file | chrome/browser/dom_ui/personal_options_handler.cc » ('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/options_ui.h" 5 #include "chrome/browser/dom_ui/options_ui.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/i18n/time_formatting.h" 10 #include "base/i18n/time_formatting.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/singleton.h" 12 #include "base/singleton.h"
13 #include "base/string_piece.h" 13 #include "base/string_piece.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/thread.h" 15 #include "base/thread.h"
16 #include "base/time.h" 16 #include "base/time.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "chrome/browser/chrome_thread.h" 18 #include "chrome/browser/chrome_thread.h"
19 #include "chrome/browser/dom_ui/advanced_options_handler.h" 19 #include "chrome/browser/dom_ui/advanced_options_handler.h"
20 #include "chrome/browser/dom_ui/browser_options_handler.h" 20 #include "chrome/browser/dom_ui/browser_options_handler.h"
21 #include "chrome/browser/dom_ui/content_settings_handler.h" 21 #include "chrome/browser/dom_ui/content_settings_handler.h"
22 #include "chrome/browser/dom_ui/core_options_handler.h" 22 #include "chrome/browser/dom_ui/core_options_handler.h"
23 #include "chrome/browser/dom_ui/personal_options_handler.h" 23 #include "chrome/browser/dom_ui/personal_options_handler.h"
24 #include "chrome/browser/dom_ui/sync_options_handler.h"
24 #include "chrome/browser/metrics/user_metrics.h" 25 #include "chrome/browser/metrics/user_metrics.h"
25 #include "chrome/browser/pref_service.h" 26 #include "chrome/browser/pref_service.h"
26 #include "chrome/browser/profile.h" 27 #include "chrome/browser/profile.h"
27 #include "chrome/browser/tab_contents/tab_contents.h" 28 #include "chrome/browser/tab_contents/tab_contents.h"
28 #include "chrome/browser/tab_contents/tab_contents_delegate.h" 29 #include "chrome/browser/tab_contents/tab_contents_delegate.h"
29 #include "chrome/common/jstemplate_builder.h" 30 #include "chrome/common/jstemplate_builder.h"
30 #include "chrome/common/notification_service.h" 31 #include "chrome/common/notification_service.h"
31 #include "chrome/common/notification_type.h" 32 #include "chrome/common/notification_type.h"
32 #include "chrome/common/time_format.h" 33 #include "chrome/common/time_format.h"
33 #include "chrome/common/url_constants.h" 34 #include "chrome/common/url_constants.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 #if defined(OS_CHROMEOS) 111 #if defined(OS_CHROMEOS)
111 AddOptionsPageUIHandler(localized_strings, 112 AddOptionsPageUIHandler(localized_strings,
112 new chromeos::CoreChromeOSOptionsHandler()); 113 new chromeos::CoreChromeOSOptionsHandler());
113 #else 114 #else
114 AddOptionsPageUIHandler(localized_strings, new CoreOptionsHandler()); 115 AddOptionsPageUIHandler(localized_strings, new CoreOptionsHandler());
115 #endif 116 #endif
116 117
117 // TODO(zelidrag): Add all other page handlers here as we implement them. 118 // TODO(zelidrag): Add all other page handlers here as we implement them.
118 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); 119 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler());
119 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); 120 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler());
121 AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler());
120 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler()); 122 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler());
123 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler());
121 #if defined(OS_CHROMEOS) 124 #if defined(OS_CHROMEOS)
122 AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler()); 125 AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler());
123 AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler());
124 AddOptionsPageUIHandler(localized_strings, new LabsHandler()); 126 AddOptionsPageUIHandler(localized_strings, new LabsHandler());
125 AddOptionsPageUIHandler(localized_strings, 127 AddOptionsPageUIHandler(localized_strings,
126 new LanguageHangulOptionsHandler()); 128 new LanguageHangulOptionsHandler());
127 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); 129 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler());
128 AddOptionsPageUIHandler(localized_strings, 130 AddOptionsPageUIHandler(localized_strings,
129 new chromeos::AccountsOptionsHandler()); 131 new chromeos::AccountsOptionsHandler());
130 #endif 132 #endif
131 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler());
132 133
133 // |localized_strings| ownership is taken over by this constructor. 134 // |localized_strings| ownership is taken over by this constructor.
134 OptionsUIHTMLSource* html_source = 135 OptionsUIHTMLSource* html_source =
135 new OptionsUIHTMLSource(localized_strings); 136 new OptionsUIHTMLSource(localized_strings);
136 137
137 // Set up the chrome://options/ source. 138 // Set up the chrome://options/ source.
138 ChromeThread::PostTask( 139 ChromeThread::PostTask(
139 ChromeThread::IO, FROM_HERE, 140 ChromeThread::IO, FROM_HERE,
140 NewRunnableMethod( 141 NewRunnableMethod(
141 Singleton<ChromeURLDataManager>::get(), 142 Singleton<ChromeURLDataManager>::get(),
(...skipping 15 matching lines...) Expand all
157 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize(); 158 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize();
158 } 159 }
159 } 160 }
160 161
161 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings, 162 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings,
162 OptionsPageUIHandler* handler) { 163 OptionsPageUIHandler* handler) {
163 DCHECK(handler); 164 DCHECK(handler);
164 handler->GetLocalizedValues(localized_strings); 165 handler->GetLocalizedValues(localized_strings);
165 AddMessageHandler(handler->Attach(this)); 166 AddMessageHandler(handler->Attach(this));
166 } 167 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/dom_ui/personal_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698