| OLD | NEW |
| 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/options_ui.h" | 5 #include "chrome/browser/dom_ui/options/options_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> |
| 8 | 9 |
| 9 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| 10 #include "base/callback.h" | 11 #include "base/callback.h" |
| 11 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 12 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 13 #include "base/singleton.h" | 14 #include "base/singleton.h" |
| 14 #include "base/string_piece.h" | 15 #include "base/string_piece.h" |
| 15 #include "base/string_util.h" | 16 #include "base/string_util.h" |
| 16 #include "base/thread.h" | 17 #include "base/thread.h" |
| 17 #include "base/time.h" | 18 #include "base/time.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 35 #include "chrome/browser/dom_ui/options/startup_page_manager_handler.h" | 36 #include "chrome/browser/dom_ui/options/startup_page_manager_handler.h" |
| 36 #include "chrome/browser/dom_ui/options/stop_syncing_handler.h" | 37 #include "chrome/browser/dom_ui/options/stop_syncing_handler.h" |
| 37 #include "chrome/browser/dom_ui/options/sync_options_handler.h" | 38 #include "chrome/browser/dom_ui/options/sync_options_handler.h" |
| 38 #include "chrome/browser/metrics/user_metrics.h" | 39 #include "chrome/browser/metrics/user_metrics.h" |
| 39 #include "chrome/browser/renderer_host/render_view_host.h" | 40 #include "chrome/browser/renderer_host/render_view_host.h" |
| 40 #include "chrome/browser/prefs/pref_service.h" | 41 #include "chrome/browser/prefs/pref_service.h" |
| 41 #include "chrome/browser/profiles/profile.h" | 42 #include "chrome/browser/profiles/profile.h" |
| 42 #include "chrome/browser/tab_contents/tab_contents.h" | 43 #include "chrome/browser/tab_contents/tab_contents.h" |
| 43 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 44 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
| 44 #include "chrome/common/jstemplate_builder.h" | 45 #include "chrome/common/jstemplate_builder.h" |
| 45 #include "chrome/common/notification_service.h" | |
| 46 #include "chrome/common/notification_type.h" | 46 #include "chrome/common/notification_type.h" |
| 47 #include "chrome/common/time_format.h" | 47 #include "chrome/common/time_format.h" |
| 48 #include "chrome/common/url_constants.h" | 48 #include "chrome/common/url_constants.h" |
| 49 #include "net/base/escape.h" | 49 #include "net/base/escape.h" |
| 50 | 50 |
| 51 #include "grit/browser_resources.h" | 51 #include "grit/browser_resources.h" |
| 52 #include "grit/chromium_strings.h" | 52 #include "grit/chromium_strings.h" |
| 53 #include "grit/generated_resources.h" | 53 #include "grit/generated_resources.h" |
| 54 #include "grit/locale_settings.h" | 54 #include "grit/locale_settings.h" |
| 55 #include "grit/theme_resources.h" | 55 #include "grit/theme_resources.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 OptionsPageUIHandler* handler_raw) { | 268 OptionsPageUIHandler* handler_raw) { |
| 269 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); | 269 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); |
| 270 DCHECK(handler.get()); | 270 DCHECK(handler.get()); |
| 271 // Add only if handler's service is enabled. | 271 // Add only if handler's service is enabled. |
| 272 if (handler->IsEnabled()) { | 272 if (handler->IsEnabled()) { |
| 273 handler->GetLocalizedValues(localized_strings); | 273 handler->GetLocalizedValues(localized_strings); |
| 274 // Add handler to the list and also pass the ownership. | 274 // Add handler to the list and also pass the ownership. |
| 275 AddMessageHandler(handler.release()->Attach(this)); | 275 AddMessageHandler(handler.release()->Attach(this)); |
| 276 } | 276 } |
| 277 } | 277 } |
| OLD | NEW |