Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 #else | 287 #else |
| 288 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); | 288 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); |
| 289 #endif | 289 #endif |
| 290 AddOptionsPageUIHandler(localized_strings, | 290 AddOptionsPageUIHandler(localized_strings, |
| 291 new LanguageDictionaryOverlayHandler()); | 291 new LanguageDictionaryOverlayHandler()); |
| 292 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler()); | 292 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler()); |
| 293 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); | 293 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); |
| 294 AddOptionsPageUIHandler(localized_strings, new ResetProfileSettingsHandler()); | 294 AddOptionsPageUIHandler(localized_strings, new ResetProfileSettingsHandler()); |
| 295 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); | 295 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); |
| 296 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); | 296 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); |
| 297 AddOptionsPageUIHandler(localized_strings, new StartupPagesHandler()); | |
| 298 AddOptionsPageUIHandler(localized_strings, | 297 AddOptionsPageUIHandler(localized_strings, |
| 299 new SupervisedUserCreateConfirmHandler()); | 298 new SupervisedUserCreateConfirmHandler()); |
| 300 AddOptionsPageUIHandler(localized_strings, new SupervisedUserImportHandler()); | 299 AddOptionsPageUIHandler(localized_strings, new SupervisedUserImportHandler()); |
| 301 AddOptionsPageUIHandler(localized_strings, | 300 AddOptionsPageUIHandler(localized_strings, |
| 302 new SupervisedUserLearnMoreHandler()); | 301 new SupervisedUserLearnMoreHandler()); |
| 303 AddOptionsPageUIHandler(localized_strings, new SyncSetupHandler( | 302 AddOptionsPageUIHandler(localized_strings, new SyncSetupHandler( |
| 304 g_browser_process->profile_manager())); | 303 g_browser_process->profile_manager())); |
| 305 AddOptionsPageUIHandler(localized_strings, new WebsiteSettingsHandler()); | 304 AddOptionsPageUIHandler(localized_strings, new WebsiteSettingsHandler()); |
| 305 | |
| 306 // Disable back end handling for certain options for guest mode. | |
| 307 if (!Profile::FromWebUI(web_ui())->IsOffTheRecord()) { | |
| 308 AddOptionsPageUIHandler(localized_strings, new StartupPagesHandler()); | |
|
Evan Stade
2014/08/19 20:41:15
it suddenly occurs to me that this might trigger o
Mike Lerman
2014/08/20 15:58:16
I was able to make this change, until I moved the
| |
| 309 } | |
| 310 | |
| 306 #if defined(OS_CHROMEOS) | 311 #if defined(OS_CHROMEOS) |
| 307 AddOptionsPageUIHandler(localized_strings, | 312 AddOptionsPageUIHandler(localized_strings, |
| 308 new chromeos::options::AccountsOptionsHandler()); | 313 new chromeos::options::AccountsOptionsHandler()); |
| 309 AddOptionsPageUIHandler(localized_strings, | 314 AddOptionsPageUIHandler(localized_strings, |
| 310 new chromeos::options::BluetoothOptionsHandler()); | 315 new chromeos::options::BluetoothOptionsHandler()); |
| 311 AddOptionsPageUIHandler(localized_strings, | 316 AddOptionsPageUIHandler(localized_strings, |
| 312 new chromeos::options::DateTimeOptionsHandler()); | 317 new chromeos::options::DateTimeOptionsHandler()); |
| 313 AddOptionsPageUIHandler(localized_strings, | 318 AddOptionsPageUIHandler(localized_strings, |
| 314 new chromeos::options::DisplayOptionsHandler()); | 319 new chromeos::options::DisplayOptionsHandler()); |
| 315 AddOptionsPageUIHandler(localized_strings, | 320 AddOptionsPageUIHandler(localized_strings, |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 467 // Add only if handler's service is enabled. | 472 // Add only if handler's service is enabled. |
| 468 if (handler->IsEnabled()) { | 473 if (handler->IsEnabled()) { |
| 469 // Add handler to the list and also pass the ownership. | 474 // Add handler to the list and also pass the ownership. |
| 470 web_ui()->AddMessageHandler(handler.release()); | 475 web_ui()->AddMessageHandler(handler.release()); |
| 471 handler_raw->GetLocalizedValues(localized_strings); | 476 handler_raw->GetLocalizedValues(localized_strings); |
| 472 handlers_.push_back(handler_raw); | 477 handlers_.push_back(handler_raw); |
| 473 } | 478 } |
| 474 } | 479 } |
| 475 | 480 |
| 476 } // namespace options | 481 } // namespace options |
| OLD | NEW |