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 <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1508 translate::TranslateDownloadManager::RequestLanguageList( | 1508 translate::TranslateDownloadManager::RequestLanguageList( |
1509 profile_->GetPrefs()); | 1509 profile_->GetPrefs()); |
1510 | 1510 |
1511 #else | 1511 #else |
1512 // Most general initialization is behind us, but opening a | 1512 // Most general initialization is behind us, but opening a |
1513 // tab and/or session restore and such is still to be done. | 1513 // tab and/or session restore and such is still to be done. |
1514 base::TimeTicks browser_open_start = base::TimeTicks::Now(); | 1514 base::TimeTicks browser_open_start = base::TimeTicks::Now(); |
1515 | 1515 |
1516 // We are in regular browser boot sequence. Open initial tabs and enter the | 1516 // We are in regular browser boot sequence. Open initial tabs and enter the |
1517 // main message loop. | 1517 // main message loop. |
1518 int result_code; | |
1519 #if defined(OS_CHROMEOS) | 1518 #if defined(OS_CHROMEOS) |
1520 // On ChromeOS multiple profiles doesn't apply, and will break if we load | 1519 // On ChromeOS multiple profiles doesn't apply, and will break if we load |
1521 // them this early as the cryptohome hasn't yet been mounted (which happens | 1520 // them this early as the cryptohome hasn't yet been mounted (which happens |
1522 // only once we log in. | 1521 // only once we log in. |
1523 std::vector<Profile*> last_opened_profiles; | 1522 std::vector<Profile*> last_opened_profiles; |
1524 #else | 1523 #else |
1525 std::vector<Profile*> last_opened_profiles = | 1524 std::vector<Profile*> last_opened_profiles = |
1526 g_browser_process->profile_manager()->GetLastOpenedProfiles(); | 1525 g_browser_process->profile_manager()->GetLastOpenedProfiles(); |
1527 #endif | 1526 #endif |
1528 | 1527 |
1529 if (browser_creator_->Start(parsed_command_line(), base::FilePath(), | 1528 if (browser_creator_->Start(parsed_command_line(), base::FilePath(), |
1530 profile_, last_opened_profiles, &result_code)) { | 1529 profile_, last_opened_profiles)) { |
1531 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) | 1530 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
1532 // Initialize autoupdate timer. Timer callback costs basically nothing | 1531 // Initialize autoupdate timer. Timer callback costs basically nothing |
1533 // when browser is not in persistent mode, so it's OK to let it ride on | 1532 // when browser is not in persistent mode, so it's OK to let it ride on |
1534 // the main thread. This needs to be done here because we don't want | 1533 // the main thread. This needs to be done here because we don't want |
1535 // to start the timer when Chrome is run inside a test harness. | 1534 // to start the timer when Chrome is run inside a test harness. |
1536 browser_process_->StartAutoupdateTimer(); | 1535 browser_process_->StartAutoupdateTimer(); |
1537 #endif | 1536 #endif |
1538 | 1537 |
1539 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 1538 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
1540 // On Linux, the running exe will be updated if an upgrade becomes | 1539 // On Linux, the running exe will be updated if an upgrade becomes |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1709 chromeos::CrosSettings::Shutdown(); | 1708 chromeos::CrosSettings::Shutdown(); |
1710 #endif | 1709 #endif |
1711 #endif | 1710 #endif |
1712 } | 1711 } |
1713 | 1712 |
1714 // Public members: | 1713 // Public members: |
1715 | 1714 |
1716 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1715 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1717 chrome_extra_parts_.push_back(parts); | 1716 chrome_extra_parts_.push_back(parts); |
1718 } | 1717 } |
OLD | NEW |