| 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 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 | 502 |
| 503 // Heap allocated class that listens for first page load, kicks off stat | 503 // Heap allocated class that listens for first page load, kicks off stat |
| 504 // recording and then deletes itself. | 504 // recording and then deletes itself. |
| 505 class LoadCompleteListener : public content::NotificationObserver { | 505 class LoadCompleteListener : public content::NotificationObserver { |
| 506 public: | 506 public: |
| 507 LoadCompleteListener() { | 507 LoadCompleteListener() { |
| 508 registrar_.Add(this, | 508 registrar_.Add(this, |
| 509 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, | 509 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, |
| 510 content::NotificationService::AllSources()); | 510 content::NotificationService::AllSources()); |
| 511 } | 511 } |
| 512 virtual ~LoadCompleteListener() {} | 512 ~LoadCompleteListener() override {} |
| 513 | 513 |
| 514 // content::NotificationObserver implementation. | 514 // content::NotificationObserver implementation. |
| 515 virtual void Observe(int type, | 515 void Observe(int type, |
| 516 const content::NotificationSource& source, | 516 const content::NotificationSource& source, |
| 517 const content::NotificationDetails& details) override { | 517 const content::NotificationDetails& details) override { |
| 518 DCHECK_EQ(content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, type); | 518 DCHECK_EQ(content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, type); |
| 519 startup_metric_utils::OnInitialPageLoadComplete(); | 519 startup_metric_utils::OnInitialPageLoadComplete(); |
| 520 delete this; | 520 delete this; |
| 521 } | 521 } |
| 522 | 522 |
| 523 private: | 523 private: |
| 524 content::NotificationRegistrar registrar_; | 524 content::NotificationRegistrar registrar_; |
| 525 DISALLOW_COPY_AND_ASSIGN(LoadCompleteListener); | 525 DISALLOW_COPY_AND_ASSIGN(LoadCompleteListener); |
| 526 }; | 526 }; |
| 527 | 527 |
| (...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1683 chromeos::CrosSettings::Shutdown(); | 1683 chromeos::CrosSettings::Shutdown(); |
| 1684 #endif | 1684 #endif |
| 1685 #endif | 1685 #endif |
| 1686 } | 1686 } |
| 1687 | 1687 |
| 1688 // Public members: | 1688 // Public members: |
| 1689 | 1689 |
| 1690 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1690 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1691 chrome_extra_parts_.push_back(parts); | 1691 chrome_extra_parts_.push_back(parts); |
| 1692 } | 1692 } |
| OLD | NEW |