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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // TODO(port): several win-only methods have been pulled out of this, but | 158 // TODO(port): several win-only methods have been pulled out of this, but |
159 // BrowserMain() as a whole needs to be broken apart so that it's usable by | 159 // BrowserMain() as a whole needs to be broken apart so that it's usable by |
160 // other platforms. For now, it's just a stub. This is a serious work in | 160 // other platforms. For now, it's just a stub. This is a serious work in |
161 // progress and should not be taken as an indication of a real refactoring. | 161 // progress and should not be taken as an indication of a real refactoring. |
162 | 162 |
163 #if defined(OS_WIN) | 163 #if defined(OS_WIN) |
164 #include "base/environment.h" // For PreRead experiment. | 164 #include "base/environment.h" // For PreRead experiment. |
165 #include "base/win/windows_version.h" | 165 #include "base/win/windows_version.h" |
166 #include "chrome/browser/browser_util_win.h" | 166 #include "chrome/browser/browser_util_win.h" |
167 #include "chrome/browser/chrome_browser_main_win.h" | 167 #include "chrome/browser/chrome_browser_main_win.h" |
| 168 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" |
168 #include "chrome/browser/first_run/try_chrome_dialog_view.h" | 169 #include "chrome/browser/first_run/try_chrome_dialog_view.h" |
169 #include "chrome/browser/first_run/upgrade_util_win.h" | 170 #include "chrome/browser/first_run/upgrade_util_win.h" |
170 #include "chrome/browser/ui/network_profile_bubble.h" | 171 #include "chrome/browser/ui/network_profile_bubble.h" |
171 #include "chrome/installer/util/helper.h" | 172 #include "chrome/installer/util/helper.h" |
172 #include "chrome/installer/util/install_util.h" | 173 #include "chrome/installer/util/install_util.h" |
173 #include "chrome/installer/util/shell_util.h" | 174 #include "chrome/installer/util/shell_util.h" |
174 #include "net/base/net_util.h" | 175 #include "net/base/net_util.h" |
175 #include "ui/base/l10n/l10n_util_win.h" | 176 #include "ui/base/l10n/l10n_util_win.h" |
176 #include "ui/gfx/win/dpi.h" | 177 #include "ui/gfx/win/dpi.h" |
177 #endif // defined(OS_WIN) | 178 #endif // defined(OS_WIN) |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 #elif defined(OS_ANDROID) | 401 #elif defined(OS_ANDROID) |
401 // The CRLSet component was enabled for some releases. This code attempts to | 402 // The CRLSet component was enabled for some releases. This code attempts to |
402 // delete it from the local disk of those how may have downloaded it. | 403 // delete it from the local disk of those how may have downloaded it. |
403 g_browser_process->crl_set_fetcher()->DeleteFromDisk(); | 404 g_browser_process->crl_set_fetcher()->DeleteFromDisk(); |
404 #endif | 405 #endif |
405 | 406 |
406 #if defined(CLD2_DYNAMIC_MODE) && defined(CLD2_IS_COMPONENT) | 407 #if defined(CLD2_DYNAMIC_MODE) && defined(CLD2_IS_COMPONENT) |
407 RegisterCldComponent(cus); | 408 RegisterCldComponent(cus); |
408 #endif | 409 #endif |
409 | 410 |
| 411 #if defined(OS_WIN) |
| 412 ExecutePendingSwReporter(cus, g_browser_process->local_state()); |
| 413 #endif |
| 414 |
410 cus->Start(); | 415 cus->Start(); |
411 } | 416 } |
412 | 417 |
413 #if !defined(OS_ANDROID) | 418 #if !defined(OS_ANDROID) |
414 bool ProcessSingletonNotificationCallback( | 419 bool ProcessSingletonNotificationCallback( |
415 const CommandLine& command_line, | 420 const CommandLine& command_line, |
416 const base::FilePath& current_directory) { | 421 const base::FilePath& current_directory) { |
417 // Drop the request if the browser process is already in shutdown path. | 422 // Drop the request if the browser process is already in shutdown path. |
418 if (!g_browser_process || g_browser_process->IsShuttingDown()) | 423 if (!g_browser_process || g_browser_process->IsShuttingDown()) |
419 return false; | 424 return false; |
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1649 chromeos::CrosSettings::Shutdown(); | 1654 chromeos::CrosSettings::Shutdown(); |
1650 #endif | 1655 #endif |
1651 #endif | 1656 #endif |
1652 } | 1657 } |
1653 | 1658 |
1654 // Public members: | 1659 // Public members: |
1655 | 1660 |
1656 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1661 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1657 chrome_extra_parts_.push_back(parts); | 1662 chrome_extra_parts_.push_back(parts); |
1658 } | 1663 } |
OLD | NEW |