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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 LoadCompleteListener() { | 559 LoadCompleteListener() { |
560 registrar_.Add(this, | 560 registrar_.Add(this, |
561 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, | 561 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, |
562 content::NotificationService::AllSources()); | 562 content::NotificationService::AllSources()); |
563 } | 563 } |
564 virtual ~LoadCompleteListener() {} | 564 virtual ~LoadCompleteListener() {} |
565 | 565 |
566 // content::NotificationObserver implementation. | 566 // content::NotificationObserver implementation. |
567 virtual void Observe(int type, | 567 virtual void Observe(int type, |
568 const content::NotificationSource& source, | 568 const content::NotificationSource& source, |
569 const content::NotificationDetails& details) { | 569 const content::NotificationDetails& details) OVERRIDE { |
570 DCHECK(type == content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME); | 570 DCHECK(type == content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME); |
571 startup_metric_utils::OnInitialPageLoadComplete(); | 571 startup_metric_utils::OnInitialPageLoadComplete(); |
572 delete this; | 572 delete this; |
573 } | 573 } |
574 | 574 |
575 private: | 575 private: |
576 content::NotificationRegistrar registrar_; | 576 content::NotificationRegistrar registrar_; |
577 DISALLOW_COPY_AND_ASSIGN(LoadCompleteListener); | 577 DISALLOW_COPY_AND_ASSIGN(LoadCompleteListener); |
578 }; | 578 }; |
579 | 579 |
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1785 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1785 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1786 uma_name += "_XP"; | 1786 uma_name += "_XP"; |
1787 | 1787 |
1788 uma_name += "_PreRead_"; | 1788 uma_name += "_PreRead_"; |
1789 uma_name += pre_read_percentage; | 1789 uma_name += pre_read_percentage; |
1790 AddPreReadHistogramTime(uma_name.c_str(), time); | 1790 AddPreReadHistogramTime(uma_name.c_str(), time); |
1791 } | 1791 } |
1792 #endif | 1792 #endif |
1793 #endif | 1793 #endif |
1794 } | 1794 } |
OLD | NEW |