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

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

Issue 5519016: Add a new GetInstance() method for singleton classes used in chrome/browser files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 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 | « chrome/browser/browser_child_process_host.cc ('k') | chrome/browser/browser_main_gtk.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 // machine. If yes and the current Chrome process is user level, we do not 1383 // machine. If yes and the current Chrome process is user level, we do not
1384 // allow the user level Chrome to run. So we notify the user and uninstall 1384 // allow the user level Chrome to run. So we notify the user and uninstall
1385 // user level Chrome. 1385 // user level Chrome.
1386 // Note this check should only happen here, after all the checks above 1386 // Note this check should only happen here, after all the checks above
1387 // (uninstall, resource bundle initialization, other chrome browser 1387 // (uninstall, resource bundle initialization, other chrome browser
1388 // processes etc). 1388 // processes etc).
1389 if (CheckMachineLevelInstall()) 1389 if (CheckMachineLevelInstall())
1390 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; 1390 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS;
1391 1391
1392 // Create the TranslateManager singleton. 1392 // Create the TranslateManager singleton.
1393 Singleton<TranslateManager>::get(); 1393 TranslateManager::GetInstance();
1394 1394
1395 #if defined(OS_MACOSX) 1395 #if defined(OS_MACOSX)
1396 if (!parsed_command_line.HasSwitch(switches::kNoFirstRun)) { 1396 if (!parsed_command_line.HasSwitch(switches::kNoFirstRun)) {
1397 // Disk image installation is sort of a first-run task, so it shares the 1397 // Disk image installation is sort of a first-run task, so it shares the
1398 // kNoFirstRun switch. 1398 // kNoFirstRun switch.
1399 if (MaybeInstallFromDiskImage()) { 1399 if (MaybeInstallFromDiskImage()) {
1400 // The application was installed and the installed copy has been 1400 // The application was installed and the installed copy has been
1401 // launched. This process is now obsolete. Exit. 1401 // launched. This process is now obsolete. Exit.
1402 return ResultCodes::NORMAL_EXIT; 1402 return ResultCodes::NORMAL_EXIT;
1403 } 1403 }
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 #if defined(OS_CHROMEOS) 1700 #if defined(OS_CHROMEOS)
1701 // To be precise, logout (browser shutdown) is not yet done, but the 1701 // To be precise, logout (browser shutdown) is not yet done, but the
1702 // remaining work is negligible, hence we say LogoutDone here. 1702 // remaining work is negligible, hence we say LogoutDone here.
1703 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1703 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1704 false); 1704 false);
1705 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1705 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1706 #endif 1706 #endif
1707 TRACE_EVENT_END("BrowserMain", 0, 0); 1707 TRACE_EVENT_END("BrowserMain", 0, 0);
1708 return result_code; 1708 return result_code;
1709 } 1709 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_child_process_host.cc ('k') | chrome/browser/browser_main_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698