| 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 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1446 if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) | 1446 if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) |
| 1447 RegisterComponentsForUpdate(); | 1447 RegisterComponentsForUpdate(); |
| 1448 | 1448 |
| 1449 #if defined(OS_ANDROID) | 1449 #if defined(OS_ANDROID) |
| 1450 chrome_variations::VariationsService* variations_service = | 1450 chrome_variations::VariationsService* variations_service = |
| 1451 browser_process_->variations_service(); | 1451 browser_process_->variations_service(); |
| 1452 if (variations_service) { | 1452 if (variations_service) { |
| 1453 variations_service->set_policy_pref_service(profile_->GetPrefs()); | 1453 variations_service->set_policy_pref_service(profile_->GetPrefs()); |
| 1454 variations_service->StartRepeatedVariationsSeedFetch(); | 1454 variations_service->StartRepeatedVariationsSeedFetch(); |
| 1455 } | 1455 } |
| 1456 TranslateDownloadManager::RequestLanguageList(profile_->GetPrefs()); | 1456 translate::TranslateDownloadManager::RequestLanguageList( |
| 1457 profile_->GetPrefs()); |
| 1457 | 1458 |
| 1458 #else | 1459 #else |
| 1459 // Most general initialization is behind us, but opening a | 1460 // Most general initialization is behind us, but opening a |
| 1460 // tab and/or session restore and such is still to be done. | 1461 // tab and/or session restore and such is still to be done. |
| 1461 base::TimeTicks browser_open_start = base::TimeTicks::Now(); | 1462 base::TimeTicks browser_open_start = base::TimeTicks::Now(); |
| 1462 | 1463 |
| 1463 // We are in regular browser boot sequence. Open initial tabs and enter the | 1464 // We are in regular browser boot sequence. Open initial tabs and enter the |
| 1464 // main message loop. | 1465 // main message loop. |
| 1465 int result_code; | 1466 int result_code; |
| 1466 #if defined(OS_CHROMEOS) | 1467 #if defined(OS_CHROMEOS) |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1512 chrome_variations::VariationsService* variations_service = | 1513 chrome_variations::VariationsService* variations_service = |
| 1513 browser_process_->variations_service(); | 1514 browser_process_->variations_service(); |
| 1514 if (variations_service) { | 1515 if (variations_service) { |
| 1515 variations_service->StartRepeatedVariationsSeedFetch(); | 1516 variations_service->StartRepeatedVariationsSeedFetch(); |
| 1516 | 1517 |
| 1517 #if defined(OS_WIN) | 1518 #if defined(OS_WIN) |
| 1518 variations_service->StartGoogleUpdateRegistrySync(); | 1519 variations_service->StartGoogleUpdateRegistrySync(); |
| 1519 #endif | 1520 #endif |
| 1520 } | 1521 } |
| 1521 | 1522 |
| 1522 TranslateDownloadManager::RequestLanguageList(profile_->GetPrefs()); | 1523 translate::TranslateDownloadManager::RequestLanguageList( |
| 1524 profile_->GetPrefs()); |
| 1523 } | 1525 } |
| 1524 | 1526 |
| 1525 run_message_loop_ = true; | 1527 run_message_loop_ = true; |
| 1526 } else { | 1528 } else { |
| 1527 run_message_loop_ = false; | 1529 run_message_loop_ = false; |
| 1528 } | 1530 } |
| 1529 browser_creator_.reset(); | 1531 browser_creator_.reset(); |
| 1530 #endif // !defined(OS_ANDROID) | 1532 #endif // !defined(OS_ANDROID) |
| 1531 | 1533 |
| 1532 performance_monitor::PerformanceMonitor::GetInstance()->Initialize(); | 1534 performance_monitor::PerformanceMonitor::GetInstance()->Initialize(); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 chromeos::CrosSettings::Shutdown(); | 1651 chromeos::CrosSettings::Shutdown(); |
| 1650 #endif | 1652 #endif |
| 1651 #endif | 1653 #endif |
| 1652 } | 1654 } |
| 1653 | 1655 |
| 1654 // Public members: | 1656 // Public members: |
| 1655 | 1657 |
| 1656 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1658 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1657 chrome_extra_parts_.push_back(parts); | 1659 chrome_extra_parts_.push_back(parts); |
| 1658 } | 1660 } |
| OLD | NEW |