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 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1448 #endif | 1448 #endif |
1449 | 1449 |
1450 PreBrowserStart(); | 1450 PreBrowserStart(); |
1451 | 1451 |
1452 // Instantiate the notification UI manager, as this triggers a perf timer | 1452 // Instantiate the notification UI manager, as this triggers a perf timer |
1453 // used to measure startup time. TODO(stevenjb): Figure out what is actually | 1453 // used to measure startup time. TODO(stevenjb): Figure out what is actually |
1454 // triggering the timer and call that explicitly in the approprate place. | 1454 // triggering the timer and call that explicitly in the approprate place. |
1455 // http://crbug.com/105065. | 1455 // http://crbug.com/105065. |
1456 browser_process_->notification_ui_manager(); | 1456 browser_process_->notification_ui_manager(); |
1457 | 1457 |
1458 #if !defined(OS_ANDROID) | 1458 #if defined(OS_ANDROID) |
1459 chrome_variations::VariationsService* variations_service = | |
1460 browser_process_->variations_service(); | |
1461 if (variations_service) | |
1462 variations_service->StartRepeatedVariationsSeedFetch(); | |
SteveT
2013/04/18 15:24:53
Could you explain why we chose to do the Android c
Alexei Svitkine (slow)
2013/04/18 15:35:24
If you look down the #else codepath, that's where
| |
1463 #else | |
1459 // Most general initialization is behind us, but opening a | 1464 // Most general initialization is behind us, but opening a |
1460 // tab and/or session restore and such is still to be done. | 1465 // tab and/or session restore and such is still to be done. |
1461 base::TimeTicks browser_open_start = base::TimeTicks::Now(); | 1466 base::TimeTicks browser_open_start = base::TimeTicks::Now(); |
1462 | 1467 |
1463 // We are in regular browser boot sequence. Open initial tabs and enter the | 1468 // We are in regular browser boot sequence. Open initial tabs and enter the |
1464 // main message loop. | 1469 // main message loop. |
1465 int result_code; | 1470 int result_code; |
1466 #if defined(OS_CHROMEOS) | 1471 #if defined(OS_CHROMEOS) |
1467 // On ChromeOS multiple profiles doesn't apply, and will break if we load | 1472 // On ChromeOS multiple profiles doesn't apply, and will break if we load |
1468 // them this early as the cryptohome hasn't yet been mounted (which happens | 1473 // them this early as the cryptohome hasn't yet been mounted (which happens |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1512 // StartRepeatedVariationsSeedFetch. | 1517 // StartRepeatedVariationsSeedFetch. |
1513 if (parameters().ui_task == NULL) { | 1518 if (parameters().ui_task == NULL) { |
1514 // Request new variations seed information from server. | 1519 // Request new variations seed information from server. |
1515 chrome_variations::VariationsService* variations_service = | 1520 chrome_variations::VariationsService* variations_service = |
1516 browser_process_->variations_service(); | 1521 browser_process_->variations_service(); |
1517 if (variations_service) { | 1522 if (variations_service) { |
1518 variations_service->StartRepeatedVariationsSeedFetch(); | 1523 variations_service->StartRepeatedVariationsSeedFetch(); |
1519 | 1524 |
1520 #if defined(OS_WIN) | 1525 #if defined(OS_WIN) |
1521 variations_service->StartGoogleUpdateRegistrySync(); | 1526 variations_service->StartGoogleUpdateRegistrySync(); |
1522 #endif | 1527 #endif |
Nico
2013/04/18 19:57:10
nit: pull the body of the if into a StartVariation
Alexei Svitkine (slow)
2013/04/18 20:30:00
I see the motivation for this, but I think the end
| |
1523 } | 1528 } |
1524 | 1529 |
1525 #if !defined(OS_CHROMEOS) | 1530 #if !defined(OS_CHROMEOS) |
1526 // TODO(mad): Move this call in a proper place on CrOS. | 1531 // TODO(mad): Move this call in a proper place on CrOS. |
1527 // http://crosbug.com/17687 | 1532 // http://crosbug.com/17687 |
1528 if (translate_manager_ != NULL) { | 1533 if (translate_manager_ != NULL) { |
1529 translate_manager_->FetchLanguageListFromTranslateServer( | 1534 translate_manager_->FetchLanguageListFromTranslateServer( |
1530 profile_->GetPrefs()); | 1535 profile_->GetPrefs()); |
1531 } | 1536 } |
1532 #endif | 1537 #endif |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1734 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1739 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1735 uma_name += "_XP"; | 1740 uma_name += "_XP"; |
1736 | 1741 |
1737 uma_name += "_PreRead_"; | 1742 uma_name += "_PreRead_"; |
1738 uma_name += pre_read_percentage; | 1743 uma_name += pre_read_percentage; |
1739 AddPreReadHistogramTime(uma_name.c_str(), time); | 1744 AddPreReadHistogramTime(uma_name.c_str(), time); |
1740 } | 1745 } |
1741 #endif | 1746 #endif |
1742 #endif | 1747 #endif |
1743 } | 1748 } |
OLD | NEW |