| 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 if (only_do_metrics_recording) { | 630 if (only_do_metrics_recording) { |
| 631 // If we're testing then we don't care what the user preference is, we turn | 631 // If we're testing then we don't care what the user preference is, we turn |
| 632 // on recording, but not reporting, otherwise tests fail. | 632 // on recording, but not reporting, otherwise tests fail. |
| 633 metrics->StartRecordingForTests(); | 633 metrics->StartRecordingForTests(); |
| 634 return; | 634 return; |
| 635 } | 635 } |
| 636 | 636 |
| 637 metrics->CheckForClonedInstall( | 637 metrics->CheckForClonedInstall( |
| 638 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); | 638 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); |
| 639 const bool metrics_enabled = metrics->StartIfMetricsReportingEnabled(); | 639 const bool metrics_enabled = metrics->StartIfMetricsReportingEnabled(); |
| 640 if (metrics_enabled) { | 640 // TODO(asvitkine): Since this function is not run on Android, RAPPOR is |
| 641 // TODO(asvitkine): Since this function is not run on Android, RAPPOR is | 641 // currently disabled there. http://crbug.com/370041 |
| 642 // currently disabled there. http://crbug.com/370041 | 642 browser_process_->rappor_service()->Start( |
| 643 browser_process_->rappor_service()->Start( | 643 browser_process_->local_state(), |
| 644 browser_process_->local_state(), | 644 browser_process_->system_request_context(), |
| 645 browser_process_->system_request_context()); | 645 metrics_enabled); |
| 646 } | |
| 647 } | 646 } |
| 648 | 647 |
| 649 void ChromeBrowserMainParts::RecordBrowserStartupTime() { | 648 void ChromeBrowserMainParts::RecordBrowserStartupTime() { |
| 650 // Don't record any metrics if UI was displayed before this point e.g. | 649 // Don't record any metrics if UI was displayed before this point e.g. |
| 651 // warning dialogs. | 650 // warning dialogs. |
| 652 if (startup_metric_utils::WasNonBrowserUIDisplayed()) | 651 if (startup_metric_utils::WasNonBrowserUIDisplayed()) |
| 653 return; | 652 return; |
| 654 | 653 |
| 655 #if defined(OS_ANDROID) | 654 #if defined(OS_ANDROID) |
| 656 // On Android the first run is handled in Java code, and the C++ side of | 655 // On Android the first run is handled in Java code, and the C++ side of |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1656 chromeos::CrosSettings::Shutdown(); | 1655 chromeos::CrosSettings::Shutdown(); |
| 1657 #endif | 1656 #endif |
| 1658 #endif | 1657 #endif |
| 1659 } | 1658 } |
| 1660 | 1659 |
| 1661 // Public members: | 1660 // Public members: |
| 1662 | 1661 |
| 1663 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1662 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1664 chrome_extra_parts_.push_back(parts); | 1663 chrome_extra_parts_.push_back(parts); |
| 1665 } | 1664 } |
| OLD | NEW |