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 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1453 if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) | 1453 if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) |
1454 RegisterComponentsForUpdate(parsed_command_line()); | 1454 RegisterComponentsForUpdate(parsed_command_line()); |
1455 | 1455 |
1456 #if defined(OS_ANDROID) | 1456 #if defined(OS_ANDROID) |
1457 chrome_variations::VariationsService* variations_service = | 1457 chrome_variations::VariationsService* variations_service = |
1458 browser_process_->variations_service(); | 1458 browser_process_->variations_service(); |
1459 if (variations_service) { | 1459 if (variations_service) { |
1460 variations_service->set_policy_pref_service(profile_->GetPrefs()); | 1460 variations_service->set_policy_pref_service(profile_->GetPrefs()); |
1461 variations_service->StartRepeatedVariationsSeedFetch(); | 1461 variations_service->StartRepeatedVariationsSeedFetch(); |
1462 } | 1462 } |
1463 TranslateDownloadManager::RequestLanguageList(profile_->GetPrefs()); | 1463 translate::TranslateDownloadManager::RequestLanguageList( |
| 1464 profile_->GetPrefs()); |
1464 | 1465 |
1465 #else | 1466 #else |
1466 // Most general initialization is behind us, but opening a | 1467 // Most general initialization is behind us, but opening a |
1467 // tab and/or session restore and such is still to be done. | 1468 // tab and/or session restore and such is still to be done. |
1468 base::TimeTicks browser_open_start = base::TimeTicks::Now(); | 1469 base::TimeTicks browser_open_start = base::TimeTicks::Now(); |
1469 | 1470 |
1470 // We are in regular browser boot sequence. Open initial tabs and enter the | 1471 // We are in regular browser boot sequence. Open initial tabs and enter the |
1471 // main message loop. | 1472 // main message loop. |
1472 int result_code; | 1473 int result_code; |
1473 #if defined(OS_CHROMEOS) | 1474 #if defined(OS_CHROMEOS) |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1519 chrome_variations::VariationsService* variations_service = | 1520 chrome_variations::VariationsService* variations_service = |
1520 browser_process_->variations_service(); | 1521 browser_process_->variations_service(); |
1521 if (variations_service) { | 1522 if (variations_service) { |
1522 variations_service->StartRepeatedVariationsSeedFetch(); | 1523 variations_service->StartRepeatedVariationsSeedFetch(); |
1523 | 1524 |
1524 #if defined(OS_WIN) | 1525 #if defined(OS_WIN) |
1525 variations_service->StartGoogleUpdateRegistrySync(); | 1526 variations_service->StartGoogleUpdateRegistrySync(); |
1526 #endif | 1527 #endif |
1527 } | 1528 } |
1528 | 1529 |
1529 TranslateDownloadManager::RequestLanguageList(profile_->GetPrefs()); | 1530 translate::TranslateDownloadManager::RequestLanguageList( |
| 1531 profile_->GetPrefs()); |
1530 } | 1532 } |
1531 | 1533 |
1532 run_message_loop_ = true; | 1534 run_message_loop_ = true; |
1533 } else { | 1535 } else { |
1534 run_message_loop_ = false; | 1536 run_message_loop_ = false; |
1535 } | 1537 } |
1536 browser_creator_.reset(); | 1538 browser_creator_.reset(); |
1537 #endif // !defined(OS_ANDROID) | 1539 #endif // !defined(OS_ANDROID) |
1538 | 1540 |
1539 performance_monitor::PerformanceMonitor::GetInstance()->Initialize(); | 1541 performance_monitor::PerformanceMonitor::GetInstance()->Initialize(); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1656 chromeos::CrosSettings::Shutdown(); | 1658 chromeos::CrosSettings::Shutdown(); |
1657 #endif | 1659 #endif |
1658 #endif | 1660 #endif |
1659 } | 1661 } |
1660 | 1662 |
1661 // Public members: | 1663 // Public members: |
1662 | 1664 |
1663 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1665 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1664 chrome_extra_parts_.push_back(parts); | 1666 chrome_extra_parts_.push_back(parts); |
1665 } | 1667 } |
OLD | NEW |