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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 11412291: Creating a skeleton for Google Now for Chrome implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Travis' CR Created 8 years 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
« no previous file with comments | « no previous file | chrome/browser/ui/google_now/google_now_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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.
rgustafson 2012/12/03 19:28:59 Just to clarify, this class (chrome_browser_main)
rgustafson 2012/12/03 19:38:03 Commenting on my own comment... The singleton prop
vadimt 2012/12/03 20:48:57 Done.
vadimt 2012/12/03 20:48:57 That's an incredibly good question! You've actuall
rgustafson 2012/12/04 00:38:01 Okay good, just wanted to make sure the multi-prof
1411 #if !defined(OS_ANDROID) && !defined(OS_IOS)
1412 if (CommandLine::ForCurrentProcess()->HasSwitch(
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/google_now/google_now_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698