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/chromeos/boot_times_loader.h" | 5 #include "chrome/browser/chromeos/boot_times_loader.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 static const char kUmaLoginPrefix[] = "BootTime."; | 94 static const char kUmaLoginPrefix[] = "BootTime."; |
95 static const char kUmaLogout[] = "ShutdownTime.Logout"; | 95 static const char kUmaLogout[] = "ShutdownTime.Logout"; |
96 static const char kUmaLogoutPrefix[] = "ShutdownTime."; | 96 static const char kUmaLogoutPrefix[] = "ShutdownTime."; |
97 | 97 |
98 // Name of file collecting login times. | 98 // Name of file collecting login times. |
99 static const FilePath::CharType kLoginTimes[] = FPL("login-times"); | 99 static const FilePath::CharType kLoginTimes[] = FPL("login-times"); |
100 | 100 |
101 // Name of file collecting logout times. | 101 // Name of file collecting logout times. |
102 static const char kLogoutTimes[] = "logout-times"; | 102 static const char kLogoutTimes[] = "logout-times"; |
103 | 103 |
104 static base::LazyInstance<BootTimesLoader> g_boot_times_loader( | 104 static base::LazyInstance<BootTimesLoader> g_boot_times_loader = |
105 base::LINKER_INITIALIZED); | 105 LAZY_INSTANCE_INITIALIZER; |
106 | 106 |
107 BootTimesLoader::BootTimesLoader() | 107 BootTimesLoader::BootTimesLoader() |
108 : backend_(new Backend()), | 108 : backend_(new Backend()), |
109 have_registered_(false) { | 109 have_registered_(false) { |
110 login_time_markers_.reserve(30); | 110 login_time_markers_.reserve(30); |
111 logout_time_markers_.reserve(30); | 111 logout_time_markers_.reserve(30); |
112 } | 112 } |
113 | 113 |
114 BootTimesLoader::~BootTimesLoader() {} | 114 BootTimesLoader::~BootTimesLoader() {} |
115 | 115 |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 GetRenderWidgetHost(&tab_contents->controller()); | 478 GetRenderWidgetHost(&tab_contents->controller()); |
479 render_widget_hosts_loading_.erase(render_widget_host); | 479 render_widget_hosts_loading_.erase(render_widget_host); |
480 break; | 480 break; |
481 } | 481 } |
482 default: | 482 default: |
483 break; | 483 break; |
484 } | 484 } |
485 } | 485 } |
486 | 486 |
487 } // namespace chromeos | 487 } // namespace chromeos |
OLD | NEW |