| OLD | NEW | 
|---|
| 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/browser_main.h" | 5 #include "chrome/browser/browser_main.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 151 #include "chrome/browser/platform_util.h" | 151 #include "chrome/browser/platform_util.h" | 
| 152 #include "chrome/browser/ui/views/browser_dialogs.h" | 152 #include "chrome/browser/ui/views/browser_dialogs.h" | 
| 153 #endif | 153 #endif | 
| 154 | 154 | 
| 155 // TODO(port): several win-only methods have been pulled out of this, but | 155 // TODO(port): several win-only methods have been pulled out of this, but | 
| 156 // BrowserMain() as a whole needs to be broken apart so that it's usable by | 156 // BrowserMain() as a whole needs to be broken apart so that it's usable by | 
| 157 // other platforms. For now, it's just a stub. This is a serious work in | 157 // other platforms. For now, it's just a stub. This is a serious work in | 
| 158 // progress and should not be taken as an indication of a real refactoring. | 158 // progress and should not be taken as an indication of a real refactoring. | 
| 159 | 159 | 
| 160 #if defined(OS_WIN) | 160 #if defined(OS_WIN) | 
|  | 161 #include <windows.h> | 
| 161 #include <commctrl.h> | 162 #include <commctrl.h> | 
| 162 #include <shellapi.h> | 163 #include <shellapi.h> | 
| 163 #include <windows.h> |  | 
| 164 | 164 | 
| 165 #include "app/win/scoped_com_initializer.h" | 165 #include "base/win/scoped_com_initializer.h" | 
| 166 #include "base/win/windows_version.h" | 166 #include "base/win/windows_version.h" | 
| 167 #include "chrome/browser/browser_trial.h" | 167 #include "chrome/browser/browser_trial.h" | 
| 168 #include "chrome/browser/browser_util_win.h" | 168 #include "chrome/browser/browser_util_win.h" | 
| 169 #include "chrome/browser/first_run/try_chrome_dialog_view.h" | 169 #include "chrome/browser/first_run/try_chrome_dialog_view.h" | 
| 170 #include "chrome/browser/first_run/upgrade_util_win.h" | 170 #include "chrome/browser/first_run/upgrade_util_win.h" | 
| 171 #include "chrome/browser/net/url_fixer_upper.h" | 171 #include "chrome/browser/net/url_fixer_upper.h" | 
| 172 #include "chrome/browser/rlz/rlz.h" | 172 #include "chrome/browser/rlz/rlz.h" | 
| 173 #include "chrome/browser/ui/views/user_data_dir_dialog.h" | 173 #include "chrome/browser/ui/views/user_data_dir_dialog.h" | 
| 174 #include "chrome/installer/util/helper.h" | 174 #include "chrome/installer/util/helper.h" | 
| 175 #include "chrome/installer/util/install_util.h" | 175 #include "chrome/installer/util/install_util.h" | 
| (...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1685   if (parsed_command_line.HasSwitch(switches::kDisablePreconnect)) | 1685   if (parsed_command_line.HasSwitch(switches::kDisablePreconnect)) | 
| 1686     preconnect_enabled = false; | 1686     preconnect_enabled = false; | 
| 1687   else if (parsed_command_line.HasSwitch(switches::kEnablePreconnect)) | 1687   else if (parsed_command_line.HasSwitch(switches::kEnablePreconnect)) | 
| 1688     preconnect_enabled = true; | 1688     preconnect_enabled = true; | 
| 1689   chrome_browser_net::PredictorInit dns_prefetch( | 1689   chrome_browser_net::PredictorInit dns_prefetch( | 
| 1690       user_prefs, | 1690       user_prefs, | 
| 1691       local_state, | 1691       local_state, | 
| 1692       preconnect_enabled); | 1692       preconnect_enabled); | 
| 1693 | 1693 | 
| 1694 #if defined(OS_WIN) | 1694 #if defined(OS_WIN) | 
| 1695   app::win::ScopedCOMInitializer com_initializer; | 1695   base::win::ScopedCOMInitializer com_initializer; | 
| 1696 | 1696 | 
| 1697 #if defined(GOOGLE_CHROME_BUILD) | 1697 #if defined(GOOGLE_CHROME_BUILD) | 
| 1698   // Init the RLZ library. This just binds the dll and schedules a task on the | 1698   // Init the RLZ library. This just binds the dll and schedules a task on the | 
| 1699   // file thread to be run sometime later. If this is the first run we record | 1699   // file thread to be run sometime later. If this is the first run we record | 
| 1700   // the installation event. | 1700   // the installation event. | 
| 1701   bool google_search_default = false; | 1701   bool google_search_default = false; | 
| 1702   TemplateURLService* template_url_service = | 1702   TemplateURLService* template_url_service = | 
| 1703       TemplateURLServiceFactory::GetForProfile(profile); | 1703       TemplateURLServiceFactory::GetForProfile(profile); | 
| 1704   if (template_url_service) { | 1704   if (template_url_service) { | 
| 1705     const TemplateURL* url_template = | 1705     const TemplateURL* url_template = | 
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1985 #if defined(OS_CHROMEOS) | 1985 #if defined(OS_CHROMEOS) | 
| 1986   // To be precise, logout (browser shutdown) is not yet done, but the | 1986   // To be precise, logout (browser shutdown) is not yet done, but the | 
| 1987   // remaining work is negligible, hence we say LogoutDone here. | 1987   // remaining work is negligible, hence we say LogoutDone here. | 
| 1988   chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1988   chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 
| 1989                                                         false); | 1989                                                         false); | 
| 1990   chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1990   chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 
| 1991 #endif | 1991 #endif | 
| 1992   TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 1992   TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 
| 1993   return result_code; | 1993   return result_code; | 
| 1994 } | 1994 } | 
| OLD | NEW | 
|---|