| 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 content::NotificationService::AllSources()); | 349 content::NotificationService::AllSources()); |
| 350 registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP, | 350 registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP, |
| 351 content::NotificationService::AllSources()); | 351 content::NotificationService::AllSources()); |
| 352 registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, | 352 registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, |
| 353 content::NotificationService::AllSources()); | 353 content::NotificationService::AllSources()); |
| 354 registrar_.Remove(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT, | 354 registrar_.Remove(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT, |
| 355 content::NotificationService::AllSources()); | 355 content::NotificationService::AllSources()); |
| 356 // Don't swamp the FILE thread right away. | 356 // Don't swamp the FILE thread right away. |
| 357 BrowserThread::PostDelayedTask( | 357 BrowserThread::PostDelayedTask( |
| 358 BrowserThread::FILE, FROM_HERE, | 358 BrowserThread::FILE, FROM_HERE, |
| 359 // This doesn't compile without std::string(...), as | 359 // This doesn't compile without std::string(...), as base::Bind doesn't |
| 360 // NewRunnableFunction doesn't accept arrays. | 360 // accept arrays. |
| 361 // TODO(jhawkins): Verify this is true for base::Bind. |
| 361 base::Bind(WriteTimes, | 362 base::Bind(WriteTimes, |
| 362 std::string(kLoginTimes), | 363 std::string(kLoginTimes), |
| 363 std::string(kUmaLogin), | 364 std::string(kUmaLogin), |
| 364 std::string(kUmaLoginPrefix), | 365 std::string(kUmaLoginPrefix), |
| 365 login_time_markers_), | 366 login_time_markers_), |
| 366 kLoginTimeWriteDelayMs); | 367 kLoginTimeWriteDelayMs); |
| 367 } | 368 } |
| 368 | 369 |
| 369 void BootTimesLoader::WriteLogoutTimes() { | 370 void BootTimesLoader::WriteLogoutTimes() { |
| 370 WriteTimes(kLogoutTimes, | 371 WriteTimes(kLogoutTimes, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 GetRenderWidgetHost(&tab_contents->GetController()); | 479 GetRenderWidgetHost(&tab_contents->GetController()); |
| 479 render_widget_hosts_loading_.erase(render_widget_host); | 480 render_widget_hosts_loading_.erase(render_widget_host); |
| 480 break; | 481 break; |
| 481 } | 482 } |
| 482 default: | 483 default: |
| 483 break; | 484 break; |
| 484 } | 485 } |
| 485 } | 486 } |
| 486 | 487 |
| 487 } // namespace chromeos | 488 } // namespace chromeos |
| OLD | NEW |