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

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

Issue 6861001: first-run: Pull IsBrowserAlreadyRunning() out of upgrade_util_win.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 months 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/browser_main_win.cc » ('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) 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // progress and should not be taken as an indication of a real refactoring. 152 // progress and should not be taken as an indication of a real refactoring.
153 153
154 #if defined(OS_WIN) 154 #if defined(OS_WIN)
155 #include <commctrl.h> 155 #include <commctrl.h>
156 #include <shellapi.h> 156 #include <shellapi.h>
157 #include <windows.h> 157 #include <windows.h>
158 158
159 #include "app/win/scoped_com_initializer.h" 159 #include "app/win/scoped_com_initializer.h"
160 #include "base/win/windows_version.h" 160 #include "base/win/windows_version.h"
161 #include "chrome/browser/browser_trial.h" 161 #include "chrome/browser/browser_trial.h"
162 #include "chrome/browser/browser_util_win.h"
162 #include "chrome/browser/first_run/try_chrome_dialog_view.h" 163 #include "chrome/browser/first_run/try_chrome_dialog_view.h"
163 #include "chrome/browser/first_run/upgrade_util_win.h" 164 #include "chrome/browser/first_run/upgrade_util_win.h"
164 #include "chrome/browser/metrics/user_metrics.h" 165 #include "chrome/browser/metrics/user_metrics.h"
165 #include "chrome/browser/net/url_fixer_upper.h" 166 #include "chrome/browser/net/url_fixer_upper.h"
166 #include "chrome/browser/rlz/rlz.h" 167 #include "chrome/browser/rlz/rlz.h"
167 #include "chrome/browser/ui/views/user_data_dir_dialog.h" 168 #include "chrome/browser/ui/views/user_data_dir_dialog.h"
168 #include "chrome/common/sandbox_policy.h" 169 #include "chrome/common/sandbox_policy.h"
169 #include "chrome/installer/util/helper.h" 170 #include "chrome/installer/util/helper.h"
170 #include "chrome/installer/util/install_util.h" 171 #include "chrome/installer/util/install_util.h"
171 #include "chrome/installer/util/shell_util.h" 172 #include "chrome/installer/util/shell_util.h"
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 chromeos::OwnershipService::GetSharedInstance(); 1350 chromeos::OwnershipService::GetSharedInstance();
1350 #endif 1351 #endif
1351 1352
1352 // Record last shutdown time into a histogram. 1353 // Record last shutdown time into a histogram.
1353 browser_shutdown::ReadLastShutdownInfo(); 1354 browser_shutdown::ReadLastShutdownInfo();
1354 1355
1355 #if defined(OS_WIN) 1356 #if defined(OS_WIN)
1356 // On Windows, we use our startup as an opportunity to do upgrade/uninstall 1357 // On Windows, we use our startup as an opportunity to do upgrade/uninstall
1357 // tasks. Those care whether the browser is already running. On Linux/Mac, 1358 // tasks. Those care whether the browser is already running. On Linux/Mac,
1358 // upgrade/uninstall happen separately. 1359 // upgrade/uninstall happen separately.
1359 bool already_running = upgrade_util::IsBrowserAlreadyRunning(); 1360 bool already_running = browser_util::IsBrowserAlreadyRunning();
1360 1361
1361 // If the command line specifies 'uninstall' then we need to work here 1362 // If the command line specifies 'uninstall' then we need to work here
1362 // unless we detect another chrome browser running. 1363 // unless we detect another chrome browser running.
1363 if (parsed_command_line.HasSwitch(switches::kUninstall)) 1364 if (parsed_command_line.HasSwitch(switches::kUninstall))
1364 return DoUninstallTasks(already_running); 1365 return DoUninstallTasks(already_running);
1365 #endif 1366 #endif
1366 1367
1367 if (parsed_command_line.HasSwitch(switches::kHideIcons) || 1368 if (parsed_command_line.HasSwitch(switches::kHideIcons) ||
1368 parsed_command_line.HasSwitch(switches::kShowIcons)) 1369 parsed_command_line.HasSwitch(switches::kShowIcons))
1369 return HandleIconsCommands(parsed_command_line); 1370 return HandleIconsCommands(parsed_command_line);
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 #if defined(OS_CHROMEOS) 1864 #if defined(OS_CHROMEOS)
1864 // To be precise, logout (browser shutdown) is not yet done, but the 1865 // To be precise, logout (browser shutdown) is not yet done, but the
1865 // remaining work is negligible, hence we say LogoutDone here. 1866 // remaining work is negligible, hence we say LogoutDone here.
1866 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1867 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1867 false); 1868 false);
1868 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1869 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1869 #endif 1870 #endif
1870 TRACE_EVENT_END("BrowserMain", 0, 0); 1871 TRACE_EVENT_END("BrowserMain", 0, 0);
1871 return result_code; 1872 return result_code;
1872 } 1873 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_main_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698