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 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 193 |
194 // TODO(port): several win-only methods have been pulled out of this, but | 194 // TODO(port): several win-only methods have been pulled out of this, but |
195 // BrowserMain() as a whole needs to be broken apart so that it's usable by | 195 // BrowserMain() as a whole needs to be broken apart so that it's usable by |
196 // other platforms. For now, it's just a stub. This is a serious work in | 196 // other platforms. For now, it's just a stub. This is a serious work in |
197 // progress and should not be taken as an indication of a real refactoring. | 197 // progress and should not be taken as an indication of a real refactoring. |
198 | 198 |
199 #if defined(OS_WIN) | 199 #if defined(OS_WIN) |
200 #include "base/trace_event/trace_event_etw_export_win.h" | 200 #include "base/trace_event/trace_event_etw_export_win.h" |
201 #include "base/win/registry.h" | 201 #include "base/win/registry.h" |
202 #include "base/win/win_util.h" | 202 #include "base/win/win_util.h" |
203 #include "base/win/windows_version.h" | |
204 #include "chrome/browser/chrome_browser_main_win.h" | 203 #include "chrome/browser/chrome_browser_main_win.h" |
205 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" | 204 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" |
206 #include "chrome/browser/downgrade/user_data_downgrade.h" | 205 #include "chrome/browser/downgrade/user_data_downgrade.h" |
207 #include "chrome/browser/first_run/try_chrome_dialog_view.h" | 206 #include "chrome/browser/first_run/try_chrome_dialog_view.h" |
208 #include "chrome/browser/first_run/upgrade_util_win.h" | 207 #include "chrome/browser/first_run/upgrade_util_win.h" |
209 #include "chrome/browser/ui/network_profile_bubble.h" | 208 #include "chrome/browser/ui/network_profile_bubble.h" |
210 #include "chrome/browser/win/browser_util.h" | 209 #include "chrome/browser/win/browser_util.h" |
211 #include "chrome/browser/win/chrome_select_file_dialog_factory.h" | 210 #include "chrome/browser/win/chrome_select_file_dialog_factory.h" |
212 #include "chrome/install_static/install_util.h" | 211 #include "chrome/install_static/install_util.h" |
213 #include "ui/base/l10n/l10n_util_win.h" | 212 #include "ui/base/l10n/l10n_util_win.h" |
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1699 // popup asking the user to restart chrome. It is done this late to avoid | 1698 // popup asking the user to restart chrome. It is done this late to avoid |
1700 // testing against a bunch of special cases that are taken care early on. | 1699 // testing against a bunch of special cases that are taken care early on. |
1701 ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( | 1700 ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( |
1702 parsed_command_line()); | 1701 parsed_command_line()); |
1703 | 1702 |
1704 // Registers Chrome with the Windows Restart Manager, which will restore the | 1703 // Registers Chrome with the Windows Restart Manager, which will restore the |
1705 // Chrome session when the computer is restarted after a system update. | 1704 // Chrome session when the computer is restarted after a system update. |
1706 // This could be run as late as WM_QUERYENDSESSION for system update reboots, | 1705 // This could be run as late as WM_QUERYENDSESSION for system update reboots, |
1707 // but should run on startup if extended to handle crashes/hangs/patches. | 1706 // but should run on startup if extended to handle crashes/hangs/patches. |
1708 // Also, better to run once here than once for each HWND's WM_QUERYENDSESSION. | 1707 // Also, better to run once here than once for each HWND's WM_QUERYENDSESSION. |
1709 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { | 1708 ChromeBrowserMainPartsWin::RegisterApplicationRestart(parsed_command_line()); |
1710 ChromeBrowserMainPartsWin::RegisterApplicationRestart( | |
1711 parsed_command_line()); | |
1712 } | |
1713 | 1709 |
1714 // Verify that the profile is not on a network share and if so prepare to show | 1710 // Verify that the profile is not on a network share and if so prepare to show |
1715 // notification to the user. | 1711 // notification to the user. |
1716 if (NetworkProfileBubble::ShouldCheckNetworkProfile(profile_)) { | 1712 if (NetworkProfileBubble::ShouldCheckNetworkProfile(profile_)) { |
1717 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 1713 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
1718 base::Bind(&NetworkProfileBubble::CheckNetworkProfile, | 1714 base::Bind(&NetworkProfileBubble::CheckNetworkProfile, |
1719 profile_->GetPath())); | 1715 profile_->GetPath())); |
1720 } | 1716 } |
1721 #endif // defined(OS_WIN) | 1717 #endif // defined(OS_WIN) |
1722 | 1718 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2086 chromeos::CrosSettings::Shutdown(); | 2082 chromeos::CrosSettings::Shutdown(); |
2087 #endif // defined(OS_CHROMEOS) | 2083 #endif // defined(OS_CHROMEOS) |
2088 #endif // defined(OS_ANDROID) | 2084 #endif // defined(OS_ANDROID) |
2089 } | 2085 } |
2090 | 2086 |
2091 // Public members: | 2087 // Public members: |
2092 | 2088 |
2093 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2089 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
2094 chrome_extra_parts_.push_back(parts); | 2090 chrome_extra_parts_.push_back(parts); |
2095 } | 2091 } |
OLD | NEW |