OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "chrome/common/chrome_constants.h" | 44 #include "chrome/common/chrome_constants.h" |
45 #include "chrome/common/chrome_paths.h" | 45 #include "chrome/common/chrome_paths.h" |
46 #include "chrome/common/chrome_switches.h" | 46 #include "chrome/common/chrome_switches.h" |
47 #include "chrome/common/histogram_synchronizer.h" | 47 #include "chrome/common/histogram_synchronizer.h" |
48 #include "chrome/common/jstemplate_builder.h" | 48 #include "chrome/common/jstemplate_builder.h" |
49 #include "chrome/common/main_function_params.h" | 49 #include "chrome/common/main_function_params.h" |
50 #include "chrome/common/pref_names.h" | 50 #include "chrome/common/pref_names.h" |
51 #include "chrome/common/pref_service.h" | 51 #include "chrome/common/pref_service.h" |
52 #include "chrome/common/result_codes.h" | 52 #include "chrome/common/result_codes.h" |
53 #include "chrome/installer/util/google_update_settings.h" | 53 #include "chrome/installer/util/google_update_settings.h" |
| 54 #include "chrome/installer/util/master_preferences.h" |
54 #include "grit/chromium_strings.h" | 55 #include "grit/chromium_strings.h" |
55 #include "grit/generated_resources.h" | 56 #include "grit/generated_resources.h" |
56 #include "grit/net_resources.h" | 57 #include "grit/net_resources.h" |
57 #include "net/base/cookie_monster.h" | 58 #include "net/base/cookie_monster.h" |
58 #include "net/base/net_module.h" | 59 #include "net/base/net_module.h" |
59 #include "net/http/http_network_session.h" | 60 #include "net/http/http_network_session.h" |
60 | 61 |
61 #if defined(OS_POSIX) | 62 #if defined(OS_POSIX) |
62 // TODO(port): get rid of this include. It's used just to provide declarations | 63 // TODO(port): get rid of this include. It's used just to provide declarations |
63 // and stub definitions for classes we encouter during the porting effort. | 64 // and stub definitions for classes we encouter during the porting effort. |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 | 657 |
657 #if defined(OS_WIN) | 658 #if defined(OS_WIN) |
658 // Init common control sex. | 659 // Init common control sex. |
659 INITCOMMONCONTROLSEX config; | 660 INITCOMMONCONTROLSEX config; |
660 config.dwSize = sizeof(config); | 661 config.dwSize = sizeof(config); |
661 config.dwICC = ICC_WIN95_CLASSES; | 662 config.dwICC = ICC_WIN95_CLASSES; |
662 InitCommonControlsEx(&config); | 663 InitCommonControlsEx(&config); |
663 | 664 |
664 win_util::ScopedCOMInitializer com_initializer; | 665 win_util::ScopedCOMInitializer com_initializer; |
665 | 666 |
| 667 int delay = 0; |
| 668 installer_util::GetDistributionPingDelay(FilePath(), delay); |
666 // Init the RLZ library. This just binds the dll and schedules a task on the | 669 // Init the RLZ library. This just binds the dll and schedules a task on the |
667 // file thread to be run sometime later. If this is the first run we record | 670 // file thread to be run sometime later. If this is the first run we record |
668 // the installation event. | 671 // the installation event. |
669 RLZTracker::InitRlzDelayed(base::DIR_MODULE, is_first_run); | 672 RLZTracker::InitRlzDelayed(base::DIR_MODULE, is_first_run, delay); |
670 #endif | 673 #endif |
671 | 674 |
672 // Config the network module so it has access to resources. | 675 // Config the network module so it has access to resources. |
673 net::NetModule::SetResourceProvider(NetResourceProvider); | 676 net::NetModule::SetResourceProvider(NetResourceProvider); |
674 | 677 |
675 // Register our global network handler for chrome:// and | 678 // Register our global network handler for chrome:// and |
676 // chrome-extension:// URLs. | 679 // chrome-extension:// URLs. |
677 RegisterURLRequestChromeJob(); | 680 RegisterURLRequestChromeJob(); |
678 RegisterExtensionProtocols(); | 681 RegisterExtensionProtocols(); |
679 | 682 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 if (metrics) | 801 if (metrics) |
799 metrics->Stop(); | 802 metrics->Stop(); |
800 | 803 |
801 // browser_shutdown takes care of deleting browser_process, so we need to | 804 // browser_shutdown takes care of deleting browser_process, so we need to |
802 // release it. | 805 // release it. |
803 browser_process.release(); | 806 browser_process.release(); |
804 browser_shutdown::Shutdown(); | 807 browser_shutdown::Shutdown(); |
805 | 808 |
806 return result_code; | 809 return result_code; |
807 } | 810 } |
OLD | NEW |