OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_shutdown.h" | 5 #include "chrome/browser/browser_shutdown.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 21 matching lines...) Expand all Loading... | |
32 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 32 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
33 #include "chrome/common/chrome_paths.h" | 33 #include "chrome/common/chrome_paths.h" |
34 #include "chrome/common/chrome_switches.h" | 34 #include "chrome/common/chrome_switches.h" |
35 #include "chrome/common/pref_names.h" | 35 #include "chrome/common/pref_names.h" |
36 #include "chrome/common/switch_utils.h" | 36 #include "chrome/common/switch_utils.h" |
37 #include "content/browser/browser_thread.h" | 37 #include "content/browser/browser_thread.h" |
38 #include "content/browser/plugin_process_host.h" | 38 #include "content/browser/plugin_process_host.h" |
39 #include "content/browser/renderer_host/render_process_host.h" | 39 #include "content/browser/renderer_host/render_process_host.h" |
40 #include "content/browser/renderer_host/render_view_host.h" | 40 #include "content/browser/renderer_host/render_view_host.h" |
41 #include "content/browser/renderer_host/render_widget_host.h" | 41 #include "content/browser/renderer_host/render_widget_host.h" |
42 #include "net/predictor_api.h" | 42 #include "net/predictor.h" |
willchan no longer on Chromium
2011/08/10 16:10:35
I don't think you need this anymore.
rpetterson
2011/08/12 03:12:36
Done.
| |
43 #include "ui/base/resource/resource_bundle.h" | 43 #include "ui/base/resource/resource_bundle.h" |
44 | 44 |
45 #if defined(OS_WIN) | 45 #if defined(OS_WIN) |
46 #include "chrome/browser/browser_util_win.h" | 46 #include "chrome/browser/browser_util_win.h" |
47 #include "chrome/browser/first_run/upgrade_util_win.h" | 47 #include "chrome/browser/first_run/upgrade_util_win.h" |
48 #include "chrome/browser/rlz/rlz.h" | 48 #include "chrome/browser/rlz/rlz.h" |
49 #endif | 49 #endif |
50 | 50 |
51 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
52 #include "chrome/browser/chromeos/boot_times_loader.h" | 52 #include "chrome/browser/chromeos/boot_times_loader.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 | 134 |
135 // The XInput2 event listener needs to be shut down earlier than when | 135 // The XInput2 event listener needs to be shut down earlier than when |
136 // Singletons are finally destroyed in AtExitManager. | 136 // Singletons are finally destroyed in AtExitManager. |
137 chromeos::XInputHierarchyChangedEventListener::GetInstance()->Stop(); | 137 chromeos::XInputHierarchyChangedEventListener::GetInstance()->Stop(); |
138 #endif | 138 #endif |
139 | 139 |
140 // WARNING: During logoff/shutdown (WM_ENDSESSION) we may not have enough | 140 // WARNING: During logoff/shutdown (WM_ENDSESSION) we may not have enough |
141 // time to get here. If you have something that *must* happen on end session, | 141 // time to get here. If you have something that *must* happen on end session, |
142 // consider putting it in BrowserProcessImpl::EndSession. | 142 // consider putting it in BrowserProcessImpl::EndSession. |
143 PrefService* prefs = g_browser_process->local_state(); | 143 PrefService* prefs = g_browser_process->local_state(); |
144 ProfileManager* profile_manager = g_browser_process->profile_manager(); | |
145 PrefService* user_prefs = profile_manager->GetDefaultProfile()->GetPrefs(); | |
146 | |
147 chrome_browser_net::SavePredictorStateForNextStartupAndTrim(user_prefs); | |
148 | 144 |
149 PluginUpdater::GetInstance()->Shutdown(); | 145 PluginUpdater::GetInstance()->Shutdown(); |
150 | 146 |
151 MetricsService* metrics = g_browser_process->metrics_service(); | 147 MetricsService* metrics = g_browser_process->metrics_service(); |
152 if (metrics) | 148 if (metrics) |
153 metrics->RecordCompletedSessionEnd(); | 149 metrics->RecordCompletedSessionEnd(); |
154 | 150 |
155 if (shutdown_type_ > NOT_VALID && shutdown_num_processes_ > 0) { | 151 if (shutdown_type_ > NOT_VALID && shutdown_num_processes_ > 0) { |
156 // Record the shutdown info so that we can put it into a histogram at next | 152 // Record the shutdown info so that we can put it into a histogram at next |
157 // startup. | 153 // startup. |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
326 | 322 |
327 bool ShuttingDownWithoutClosingBrowsers() { | 323 bool ShuttingDownWithoutClosingBrowsers() { |
328 #if defined(USE_X11) | 324 #if defined(USE_X11) |
329 if (GetShutdownType() == browser_shutdown::END_SESSION) | 325 if (GetShutdownType() == browser_shutdown::END_SESSION) |
330 return true; | 326 return true; |
331 #endif | 327 #endif |
332 return false; | 328 return false; |
333 } | 329 } |
334 | 330 |
335 } // namespace browser_shutdown | 331 } // namespace browser_shutdown |
OLD | NEW |