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 21 matching lines...) Expand all Loading... |
32 #include "chrome/browser/browser_shutdown.h" | 32 #include "chrome/browser/browser_shutdown.h" |
33 #include "chrome/browser/chrome_thread.h" | 33 #include "chrome/browser/chrome_thread.h" |
34 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 34 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
35 #include "chrome/browser/extensions/extension_protocols.h" | 35 #include "chrome/browser/extensions/extension_protocols.h" |
36 #include "chrome/browser/first_run.h" | 36 #include "chrome/browser/first_run.h" |
37 #include "chrome/browser/metrics/metrics_service.h" | 37 #include "chrome/browser/metrics/metrics_service.h" |
38 #include "chrome/browser/net/dns_global.h" | 38 #include "chrome/browser/net/dns_global.h" |
39 #include "chrome/browser/net/metadata_url_request.h" | 39 #include "chrome/browser/net/metadata_url_request.h" |
40 #include "chrome/browser/net/sdch_dictionary_fetcher.h" | 40 #include "chrome/browser/net/sdch_dictionary_fetcher.h" |
41 #include "chrome/browser/plugin_service.h" | 41 #include "chrome/browser/plugin_service.h" |
| 42 #include "chrome/browser/privacy_blacklist/blacklist.h" |
42 #include "chrome/browser/process_singleton.h" | 43 #include "chrome/browser/process_singleton.h" |
43 #include "chrome/browser/profile_manager.h" | 44 #include "chrome/browser/profile_manager.h" |
44 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 45 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
45 #include "chrome/browser/shell_integration.h" | 46 #include "chrome/browser/shell_integration.h" |
46 #include "chrome/browser/user_data_manager.h" | 47 #include "chrome/browser/user_data_manager.h" |
47 #include "chrome/common/chrome_constants.h" | 48 #include "chrome/common/chrome_constants.h" |
48 #include "chrome/common/chrome_paths.h" | 49 #include "chrome/common/chrome_paths.h" |
49 #include "chrome/common/chrome_switches.h" | 50 #include "chrome/common/chrome_switches.h" |
50 #include "chrome/common/histogram_synchronizer.h" | 51 #include "chrome/common/histogram_synchronizer.h" |
51 #include "chrome/common/jstemplate_builder.h" | 52 #include "chrome/common/jstemplate_builder.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 #include "app/win_util.h" | 90 #include "app/win_util.h" |
90 #include "base/registry.h" | 91 #include "base/registry.h" |
91 #include "base/win_util.h" | 92 #include "base/win_util.h" |
92 #include "chrome/browser/browser.h" | 93 #include "chrome/browser/browser.h" |
93 #include "chrome/browser/browser_trial.h" | 94 #include "chrome/browser/browser_trial.h" |
94 #include "chrome/browser/jankometer.h" | 95 #include "chrome/browser/jankometer.h" |
95 #include "chrome/browser/metrics/user_metrics.h" | 96 #include "chrome/browser/metrics/user_metrics.h" |
96 #include "chrome/browser/net/url_fixer_upper.h" | 97 #include "chrome/browser/net/url_fixer_upper.h" |
97 #include "chrome/browser/profile.h" | 98 #include "chrome/browser/profile.h" |
98 #include "chrome/browser/rlz/rlz.h" | 99 #include "chrome/browser/rlz/rlz.h" |
| 100 #include "chrome/browser/views/blacklist_error_dialog.h" |
99 #include "chrome/browser/views/user_data_dir_dialog.h" | 101 #include "chrome/browser/views/user_data_dir_dialog.h" |
100 #include "chrome/common/env_vars.h" | 102 #include "chrome/common/env_vars.h" |
101 #include "chrome/installer/util/helper.h" | 103 #include "chrome/installer/util/helper.h" |
102 #include "chrome/installer/util/install_util.h" | 104 #include "chrome/installer/util/install_util.h" |
103 #include "chrome/installer/util/shell_util.h" | 105 #include "chrome/installer/util/shell_util.h" |
104 #include "chrome/installer/util/version.h" | 106 #include "chrome/installer/util/version.h" |
105 #include "net/base/net_util.h" | 107 #include "net/base/net_util.h" |
106 #include "net/base/sdch_manager.h" | 108 #include "net/base/sdch_manager.h" |
107 #include "net/base/winsock_init.h" | 109 #include "net/base/winsock_init.h" |
108 #include "net/http/http_network_layer.h" | 110 #include "net/http/http_network_layer.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 // sounds risky if we parse differently than CommandLineToArgvW. | 553 // sounds risky if we parse differently than CommandLineToArgvW. |
552 CommandLine new_command_line = parsed_command_line; | 554 CommandLine new_command_line = parsed_command_line; |
553 new_command_line.AppendSwitchWithValue(switches::kUserDataDir, | 555 new_command_line.AppendSwitchWithValue(switches::kUserDataDir, |
554 user_data_dir.ToWStringHack()); | 556 user_data_dir.ToWStringHack()); |
555 base::LaunchApp(new_command_line, false, false, NULL); | 557 base::LaunchApp(new_command_line, false, false, NULL); |
556 } | 558 } |
557 #endif // defined(OS_WIN) || defined(OS_LINUX) | 559 #endif // defined(OS_WIN) || defined(OS_LINUX) |
558 | 560 |
559 return ResultCodes::NORMAL_EXIT; | 561 return ResultCodes::NORMAL_EXIT; |
560 } | 562 } |
| 563 if (profile->GetBlacklist() && !profile->GetBlacklist()->is_good()) { |
| 564 // TODO(idanan): Enable this for other platforms once the dispatching |
| 565 // support code has been ported. See ifdefs in message_loop.h. |
| 566 #if defined(OS_WIN) |
| 567 bool accepted = BlacklistErrorDialog::RunBlacklistErrorDialog(); |
| 568 if (!accepted) |
| 569 return ResultCodes::NORMAL_EXIT; |
| 570 #else |
| 571 return ResultCodes::NORMAL_EXIT; |
| 572 #endif |
| 573 } |
| 574 |
561 | 575 |
562 PrefService* user_prefs = profile->GetPrefs(); | 576 PrefService* user_prefs = profile->GetPrefs(); |
563 DCHECK(user_prefs); | 577 DCHECK(user_prefs); |
564 | 578 |
565 // Now that local state and user prefs have been loaded, make the two pref | 579 // Now that local state and user prefs have been loaded, make the two pref |
566 // services aware of all our preferences. | 580 // services aware of all our preferences. |
567 browser::RegisterAllPrefs(user_prefs, local_state); | 581 browser::RegisterAllPrefs(user_prefs, local_state); |
568 | 582 |
569 // Now that all preferences have been registered, set the install date | 583 // Now that all preferences have been registered, set the install date |
570 // for the uninstall metrics if this is our first run. This only actually | 584 // for the uninstall metrics if this is our first run. This only actually |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 if (metrics) | 858 if (metrics) |
845 metrics->Stop(); | 859 metrics->Stop(); |
846 | 860 |
847 // browser_shutdown takes care of deleting browser_process, so we need to | 861 // browser_shutdown takes care of deleting browser_process, so we need to |
848 // release it. | 862 // release it. |
849 browser_process.release(); | 863 browser_process.release(); |
850 browser_shutdown::Shutdown(); | 864 browser_shutdown::Shutdown(); |
851 | 865 |
852 return result_code; | 866 return result_code; |
853 } | 867 } |
OLD | NEW |