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/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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 name, | 352 name, |
353 base::TimeDelta::FromMilliseconds(kMinTimeMillis), | 353 base::TimeDelta::FromMilliseconds(kMinTimeMillis), |
354 base::TimeDelta::FromMilliseconds(kMaxTimeMillis), | 354 base::TimeDelta::FromMilliseconds(kMaxTimeMillis), |
355 kNumBuckets, | 355 kNumBuckets, |
356 base::HistogramBase::kUmaTargetedHistogramFlag); | 356 base::HistogramBase::kUmaTargetedHistogramFlag); |
357 prev_hist->AddTime(since_prev); | 357 prev_hist->AddTime(since_prev); |
358 } else { | 358 } else { |
359 name = tm.name(); | 359 name = tm.name(); |
360 } | 360 } |
361 output += | 361 output += |
362 StringPrintf( | 362 base::StringPrintf( |
363 "\n%.2f +%.4f %s", | 363 "\n%.2f +%.4f %s", |
364 since_first.InSecondsF(), | 364 since_first.InSecondsF(), |
365 since_prev.InSecondsF(), | 365 since_prev.InSecondsF(), |
366 name.data()); | 366 name.data()); |
367 prev = tm.time(); | 367 prev = tm.time(); |
368 } | 368 } |
369 output += '\n'; | 369 output += '\n'; |
370 | 370 |
371 file_util::WriteFile( | 371 file_util::WriteFile( |
372 log_path.Append(base_name), output.data(), output.size()); | 372 log_path.Append(base_name), output.data(), output.size()); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 GetRenderWidgetHost(&web_contents->GetController()); | 537 GetRenderWidgetHost(&web_contents->GetController()); |
538 render_widget_hosts_loading_.erase(render_widget_host); | 538 render_widget_hosts_loading_.erase(render_widget_host); |
539 break; | 539 break; |
540 } | 540 } |
541 default: | 541 default: |
542 break; | 542 break; |
543 } | 543 } |
544 } | 544 } |
545 | 545 |
546 } // namespace chromeos | 546 } // namespace chromeos |
OLD | NEW |