Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Side by Side Diff: chrome/browser/browser_shutdown.cc

Issue 502173002: Move more metrics classes to metrics namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test compile. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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/bind.h" 10 #include "base/bind.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 #endif 142 #endif
143 143
144 // Shutdown the IPC channel to the service processes. 144 // Shutdown the IPC channel to the service processes.
145 ServiceProcessControl::GetInstance()->Disconnect(); 145 ServiceProcessControl::GetInstance()->Disconnect();
146 146
147 // WARNING: During logoff/shutdown (WM_ENDSESSION) we may not have enough 147 // WARNING: During logoff/shutdown (WM_ENDSESSION) we may not have enough
148 // time to get here. If you have something that *must* happen on end session, 148 // time to get here. If you have something that *must* happen on end session,
149 // consider putting it in BrowserProcessImpl::EndSession. 149 // consider putting it in BrowserProcessImpl::EndSession.
150 PrefService* prefs = g_browser_process->local_state(); 150 PrefService* prefs = g_browser_process->local_state();
151 151
152 MetricsService* metrics = g_browser_process->metrics_service(); 152 metrics::MetricsService* metrics = g_browser_process->metrics_service();
153 if (metrics) 153 if (metrics)
154 metrics->RecordCompletedSessionEnd(); 154 metrics->RecordCompletedSessionEnd();
155 155
156 if (shutdown_type_ > NOT_VALID && shutdown_num_processes_ > 0) { 156 if (shutdown_type_ > NOT_VALID && shutdown_num_processes_ > 0) {
157 // Record the shutdown info so that we can put it into a histogram at next 157 // Record the shutdown info so that we can put it into a histogram at next
158 // startup. 158 // startup.
159 prefs->SetInteger(prefs::kShutdownType, shutdown_type_); 159 prefs->SetInteger(prefs::kShutdownType, shutdown_type_);
160 prefs->SetInteger(prefs::kShutdownNumProcesses, shutdown_num_processes_); 160 prefs->SetInteger(prefs::kShutdownNumProcesses, shutdown_num_processes_);
161 prefs->SetInteger(prefs::kShutdownNumProcessesSlow, 161 prefs->SetInteger(prefs::kShutdownNumProcessesSlow,
162 shutdown_num_processes_slow_); 162 shutdown_num_processes_slow_);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 327
328 void SetTryingToQuit(bool quitting) { 328 void SetTryingToQuit(bool quitting) {
329 g_trying_to_quit = quitting; 329 g_trying_to_quit = quitting;
330 } 330 }
331 331
332 bool IsTryingToQuit() { 332 bool IsTryingToQuit() {
333 return g_trying_to_quit; 333 return g_trying_to_quit;
334 } 334 }
335 335
336 } // namespace browser_shutdown 336 } // namespace browser_shutdown
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698