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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 #include "chrome/browser/search_engines/search_engine_type.h" | 77 #include "chrome/browser/search_engines/search_engine_type.h" |
| 78 #include "chrome/browser/search_engines/template_url.h" | 78 #include "chrome/browser/search_engines/template_url.h" |
| 79 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 79 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
| 80 #include "chrome/browser/search_engines/template_url_service.h" | 80 #include "chrome/browser/search_engines/template_url_service.h" |
| 81 #include "chrome/browser/search_engines/template_url_service_factory.h" | 81 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 82 #include "chrome/browser/service/service_process_control.h" | 82 #include "chrome/browser/service/service_process_control.h" |
| 83 #include "chrome/browser/shell_integration.h" | 83 #include "chrome/browser/shell_integration.h" |
| 84 #include "chrome/browser/translate/translate_manager.h" | 84 #include "chrome/browser/translate/translate_manager.h" |
| 85 #include "chrome/browser/ui/browser.h" | 85 #include "chrome/browser/ui/browser.h" |
| 86 #include "chrome/browser/ui/browser_finder.h" | 86 #include "chrome/browser/ui/browser_finder.h" |
| 87 #include "chrome/browser/ui/google_now/google_now_service_factory.h" | |
| 87 #include "chrome/browser/ui/startup/default_browser_prompt.h" | 88 #include "chrome/browser/ui/startup/default_browser_prompt.h" |
| 88 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 89 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 89 #include "chrome/browser/ui/uma_browsing_activity_observer.h" | 90 #include "chrome/browser/ui/uma_browsing_activity_observer.h" |
| 90 #include "chrome/browser/ui/user_data_dir_dialog.h" | 91 #include "chrome/browser/ui/user_data_dir_dialog.h" |
| 91 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" | 92 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
| 92 #include "chrome/common/child_process_logging.h" | 93 #include "chrome/common/child_process_logging.h" |
| 93 #include "chrome/common/chrome_constants.h" | 94 #include "chrome/common/chrome_constants.h" |
| 94 #include "chrome/common/chrome_paths.h" | 95 #include "chrome/common/chrome_paths.h" |
| 95 #include "chrome/common/chrome_result_codes.h" | 96 #include "chrome/common/chrome_result_codes.h" |
| 96 #include "chrome/common/chrome_switches.h" | 97 #include "chrome/common/chrome_switches.h" |
| (...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1399 | 1400 |
| 1400 // Create the instance of the cloud print proxy service so that it can launch | 1401 // Create the instance of the cloud print proxy service so that it can launch |
| 1401 // the service process if needed. This is needed because the service process | 1402 // the service process if needed. This is needed because the service process |
| 1402 // might have shutdown because an update was available. | 1403 // might have shutdown because an update was available. |
| 1403 // TODO(torne): this should maybe be done with | 1404 // TODO(torne): this should maybe be done with |
| 1404 // ProfileKeyedServiceFactory::ServiceIsCreatedWithProfile() instead? | 1405 // ProfileKeyedServiceFactory::ServiceIsCreatedWithProfile() instead? |
| 1405 #if !defined(OS_ANDROID) | 1406 #if !defined(OS_ANDROID) |
| 1406 CloudPrintProxyServiceFactory::GetForProfile(profile_); | 1407 CloudPrintProxyServiceFactory::GetForProfile(profile_); |
| 1407 #endif | 1408 #endif |
| 1408 | 1409 |
| 1410 // Create the instance of the Google Now service. | |
| 1411 #if !defined(OS_ANDROID) && !defined(OS_IOS) | |
|
sky
2012/12/06 16:40:54
Would it be better to have a feature level ifdef,
vadimt
2012/12/06 20:43:16
Done.
| |
| 1412 if (CommandLine::ForCurrentProcess()->HasSwitch( | |
|
sky
2012/12/06 16:40:54
Do we really need to do this right at startup? Or
vadimt
2012/12/06 20:43:16
Well, it will instantiate several objects and post
sky
2012/12/06 21:07:07
I don't know enough about this feature to suggest
vadimt
2012/12/07 02:41:23
Moved past starting browser.
| |
| 1413 switches::kEnableGoogleNowIntegration)) { | |
| 1414 GoogleNowServiceFactory::GetForProfile(profile_); | |
| 1415 } | |
| 1416 #endif | |
| 1417 | |
| 1409 // Start watching all browser threads for responsiveness. | 1418 // Start watching all browser threads for responsiveness. |
| 1410 ThreadWatcherList::StartWatchingAll(parsed_command_line()); | 1419 ThreadWatcherList::StartWatchingAll(parsed_command_line()); |
| 1411 | 1420 |
| 1412 #if !defined(DISABLE_NACL) | 1421 #if !defined(DISABLE_NACL) |
| 1413 if (parsed_command_line().HasSwitch(switches::kPnaclDir)) { | 1422 if (parsed_command_line().HasSwitch(switches::kPnaclDir)) { |
| 1414 PathService::Override(chrome::DIR_PNACL_BASE, | 1423 PathService::Override(chrome::DIR_PNACL_BASE, |
| 1415 parsed_command_line().GetSwitchValuePath( | 1424 parsed_command_line().GetSwitchValuePath( |
| 1416 switches::kPnaclDir)); | 1425 switches::kPnaclDir)); |
| 1417 } | 1426 } |
| 1418 NaClProcessHost::EarlyStartup(); | 1427 NaClProcessHost::EarlyStartup(); |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1709 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1718 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1710 uma_name += "_XP"; | 1719 uma_name += "_XP"; |
| 1711 | 1720 |
| 1712 uma_name += "_PreRead_"; | 1721 uma_name += "_PreRead_"; |
| 1713 uma_name += pre_read_percentage; | 1722 uma_name += pre_read_percentage; |
| 1714 AddPreReadHistogramTime(uma_name.c_str(), time); | 1723 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1715 } | 1724 } |
| 1716 #endif | 1725 #endif |
| 1717 #endif | 1726 #endif |
| 1718 } | 1727 } |
| OLD | NEW |