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

Side by Side Diff: chrome/browser/ui/webui/options/options_ui.cc

Issue 7399015: Sync Promo: Add a way to collapse the sync promo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review feedback Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/webui/options/options_ui.h" 5 #include "chrome/browser/ui/webui/options/options_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/browser/ui/webui/options/autofill_options_handler.h" 23 #include "chrome/browser/ui/webui/options/autofill_options_handler.h"
24 #include "chrome/browser/ui/webui/options/browser_options_handler.h" 24 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
25 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h" 25 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h"
26 #include "chrome/browser/ui/webui/options/content_settings_handler.h" 26 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
27 #include "chrome/browser/ui/webui/options/handler_options_handler.h" 27 #include "chrome/browser/ui/webui/options/handler_options_handler.h"
28 #include "chrome/browser/ui/webui/options/cookies_view_handler.h" 28 #include "chrome/browser/ui/webui/options/cookies_view_handler.h"
29 #include "chrome/browser/ui/webui/options/core_options_handler.h" 29 #include "chrome/browser/ui/webui/options/core_options_handler.h"
30 #include "chrome/browser/ui/webui/options/font_settings_handler.h" 30 #include "chrome/browser/ui/webui/options/font_settings_handler.h"
31 #include "chrome/browser/ui/webui/options/import_data_handler.h" 31 #include "chrome/browser/ui/webui/options/import_data_handler.h"
32 #include "chrome/browser/ui/webui/options/language_options_handler.h" 32 #include "chrome/browser/ui/webui/options/language_options_handler.h"
33 #include "chrome/browser/ui/webui/options/options_sync_setup_handler.h"
33 #include "chrome/browser/ui/webui/options/password_manager_handler.h" 34 #include "chrome/browser/ui/webui/options/password_manager_handler.h"
34 #include "chrome/browser/ui/webui/options/personal_options_handler.h" 35 #include "chrome/browser/ui/webui/options/personal_options_handler.h"
35 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h" 36 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h"
36 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h" 37 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h"
37 #include "chrome/browser/ui/webui/options/sync_setup_handler.h"
38 #include "chrome/browser/ui/webui/theme_source.h" 38 #include "chrome/browser/ui/webui/theme_source.h"
39 #include "chrome/common/jstemplate_builder.h" 39 #include "chrome/common/jstemplate_builder.h"
40 #include "chrome/common/time_format.h" 40 #include "chrome/common/time_format.h"
41 #include "chrome/common/url_constants.h" 41 #include "chrome/common/url_constants.h"
42 #include "content/browser/browser_thread.h" 42 #include "content/browser/browser_thread.h"
43 #include "content/browser/renderer_host/render_view_host.h" 43 #include "content/browser/renderer_host/render_view_host.h"
44 #include "content/browser/tab_contents/tab_contents.h" 44 #include "content/browser/tab_contents/tab_contents.h"
45 #include "content/browser/tab_contents/tab_contents_delegate.h" 45 #include "content/browser/tab_contents/tab_contents_delegate.h"
46 #include "content/browser/user_metrics.h" 46 #include "content/browser/user_metrics.h"
47 #include "content/common/content_notification_types.h" 47 #include "content/common/content_notification_types.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 AddOptionsPageUIHandler(localized_strings, 230 AddOptionsPageUIHandler(localized_strings,
231 new chromeos::CrosLanguageOptionsHandler()); 231 new chromeos::CrosLanguageOptionsHandler());
232 #else 232 #else
233 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); 233 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler());
234 #endif 234 #endif
235 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); 235 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler());
236 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); 236 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler());
237 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); 237 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler());
238 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); 238 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler());
239 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler()); 239 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler());
240 AddOptionsPageUIHandler(localized_strings, new SyncSetupHandler()); 240 AddOptionsPageUIHandler(localized_strings, new OptionsSyncSetupHandler());
241 #if defined(OS_CHROMEOS) 241 #if defined(OS_CHROMEOS)
242 AddOptionsPageUIHandler(localized_strings, new AboutPageHandler()); 242 AddOptionsPageUIHandler(localized_strings, new AboutPageHandler());
243 AddOptionsPageUIHandler(localized_strings, 243 AddOptionsPageUIHandler(localized_strings,
244 new chromeos::AccountsOptionsHandler()); 244 new chromeos::AccountsOptionsHandler());
245 AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler()); 245 AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler());
246 AddOptionsPageUIHandler(localized_strings, 246 AddOptionsPageUIHandler(localized_strings,
247 new chromeos::LanguageChewingHandler()); 247 new chromeos::LanguageChewingHandler());
248 AddOptionsPageUIHandler(localized_strings, 248 AddOptionsPageUIHandler(localized_strings,
249 new chromeos::LanguageCustomizeModifierKeysHandler()); 249 new chromeos::LanguageCustomizeModifierKeysHandler());
250 AddOptionsPageUIHandler(localized_strings, 250 AddOptionsPageUIHandler(localized_strings,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 OptionsPageUIHandler* handler_raw) { 350 OptionsPageUIHandler* handler_raw) {
351 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); 351 scoped_ptr<OptionsPageUIHandler> handler(handler_raw);
352 DCHECK(handler.get()); 352 DCHECK(handler.get());
353 // Add only if handler's service is enabled. 353 // Add only if handler's service is enabled.
354 if (handler->IsEnabled()) { 354 if (handler->IsEnabled()) {
355 handler->GetLocalizedValues(localized_strings); 355 handler->GetLocalizedValues(localized_strings);
356 // Add handler to the list and also pass the ownership. 356 // Add handler to the list and also pass the ownership.
357 AddMessageHandler(handler.release()->Attach(this)); 357 AddMessageHandler(handler.release()->Attach(this));
358 } 358 }
359 } 359 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698