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

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

Issue 3038016: Stop Syncing Overlay and Import Data Overlay (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: order include Created 10 years, 4 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
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/i18n/time_formatting.h" 12 #include "base/i18n/time_formatting.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/singleton.h" 14 #include "base/singleton.h"
15 #include "base/string_piece.h" 15 #include "base/string_piece.h"
16 #include "base/string_util.h" 16 #include "base/string_util.h"
17 #include "base/thread.h" 17 #include "base/thread.h"
18 #include "base/time.h" 18 #include "base/time.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "chrome/browser/chrome_thread.h" 20 #include "chrome/browser/chrome_thread.h"
21 #include "chrome/browser/dom_ui/add_startup_page_handler.h" 21 #include "chrome/browser/dom_ui/add_startup_page_handler.h"
22 #include "chrome/browser/dom_ui/advanced_options_handler.h" 22 #include "chrome/browser/dom_ui/advanced_options_handler.h"
23 #include "chrome/browser/dom_ui/browser_options_handler.h" 23 #include "chrome/browser/dom_ui/browser_options_handler.h"
24 #include "chrome/browser/dom_ui/clear_browser_data_handler.h" 24 #include "chrome/browser/dom_ui/clear_browser_data_handler.h"
25 #include "chrome/browser/dom_ui/content_settings_handler.h" 25 #include "chrome/browser/dom_ui/content_settings_handler.h"
26 #include "chrome/browser/dom_ui/core_options_handler.h" 26 #include "chrome/browser/dom_ui/core_options_handler.h"
27 #include "chrome/browser/dom_ui/font_settings_handler.h" 27 #include "chrome/browser/dom_ui/font_settings_handler.h"
28 #include "chrome/browser/dom_ui/import_data_handler.h"
28 #include "chrome/browser/dom_ui/personal_options_handler.h" 29 #include "chrome/browser/dom_ui/personal_options_handler.h"
29 #include "chrome/browser/dom_ui/search_engine_manager_handler.h" 30 #include "chrome/browser/dom_ui/search_engine_manager_handler.h"
31 #include "chrome/browser/dom_ui/stop_syncing_handler.h"
30 #include "chrome/browser/dom_ui/sync_options_handler.h" 32 #include "chrome/browser/dom_ui/sync_options_handler.h"
31 #include "chrome/browser/dom_ui/dom_ui_theme_source.h" 33 #include "chrome/browser/dom_ui/dom_ui_theme_source.h"
32 #include "chrome/browser/metrics/user_metrics.h" 34 #include "chrome/browser/metrics/user_metrics.h"
33 #include "chrome/browser/pref_service.h" 35 #include "chrome/browser/pref_service.h"
34 #include "chrome/browser/profile.h" 36 #include "chrome/browser/profile.h"
35 #include "chrome/browser/tab_contents/tab_contents.h" 37 #include "chrome/browser/tab_contents/tab_contents.h"
36 #include "chrome/browser/tab_contents/tab_contents_delegate.h" 38 #include "chrome/browser/tab_contents/tab_contents_delegate.h"
37 #include "chrome/common/jstemplate_builder.h" 39 #include "chrome/common/jstemplate_builder.h"
38 #include "chrome/common/notification_service.h" 40 #include "chrome/common/notification_service.h"
39 #include "chrome/common/notification_type.h" 41 #include "chrome/common/notification_type.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 #endif 128 #endif
127 129
128 AddOptionsPageUIHandler(localized_strings, new AddStartupPageHandler()); 130 AddOptionsPageUIHandler(localized_strings, new AddStartupPageHandler());
129 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler()); 131 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler());
130 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); 132 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler());
131 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); 133 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler());
132 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); 134 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler());
133 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); 135 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler());
134 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); 136 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler());
135 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); 137 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler());
138 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler());
139 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler());
136 AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler()); 140 AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler());
137 #if defined(OS_CHROMEOS) 141 #if defined(OS_CHROMEOS)
138 AddOptionsPageUIHandler(localized_strings, 142 AddOptionsPageUIHandler(localized_strings,
139 new chromeos::AccountsOptionsHandler()); 143 new chromeos::AccountsOptionsHandler());
140 AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler()); 144 AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler());
141 AddOptionsPageUIHandler(localized_strings, new LabsHandler()); 145 AddOptionsPageUIHandler(localized_strings, new LabsHandler());
142 AddOptionsPageUIHandler(localized_strings, 146 AddOptionsPageUIHandler(localized_strings,
143 new LanguageChewingOptionsHandler()); 147 new LanguageChewingOptionsHandler());
144 AddOptionsPageUIHandler(localized_strings, 148 AddOptionsPageUIHandler(localized_strings,
145 new LanguageHangulOptionsHandler()); 149 new LanguageHangulOptionsHandler());
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize(); 191 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize();
188 } 192 }
189 } 193 }
190 194
191 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings, 195 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings,
192 OptionsPageUIHandler* handler) { 196 OptionsPageUIHandler* handler) {
193 DCHECK(handler); 197 DCHECK(handler);
194 handler->GetLocalizedValues(localized_strings); 198 handler->GetLocalizedValues(localized_strings);
195 AddMessageHandler(handler->Attach(this)); 199 AddMessageHandler(handler->Attach(this));
196 } 200 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/import_data_handler.cc ('k') | chrome/browser/dom_ui/personal_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698