Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 916133003: Fix ChromeMetricsServiceAccessor::IsMetricsReportingEnabled on CrOs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make MetricsServicesManager::IsMetricsReportingEnabled private Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } 664 }
665 665
666 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- 666 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related --------------
667 667
668 void ChromeBrowserMainParts::StartMetricsRecording() { 668 void ChromeBrowserMainParts::StartMetricsRecording() {
669 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); 669 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording");
670 670
671 g_browser_process->metrics_service()->CheckForClonedInstall( 671 g_browser_process->metrics_service()->CheckForClonedInstall(
672 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); 672 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
673 673
674 bool may_record = g_browser_process->GetMetricsServicesManager()-> 674 g_browser_process->GetMetricsServicesManager()->UpdateUploadPermissions(true);
675 IsMetricsReportingEnabled();
676
677 g_browser_process->GetMetricsServicesManager()->UpdatePermissions(
678 may_record, true);
679 } 675 }
680 676
681 void ChromeBrowserMainParts::RecordBrowserStartupTime() { 677 void ChromeBrowserMainParts::RecordBrowserStartupTime() {
682 // Don't record any metrics if UI was displayed before this point e.g. 678 // Don't record any metrics if UI was displayed before this point e.g.
683 // warning dialogs. 679 // warning dialogs.
684 if (startup_metric_utils::WasNonBrowserUIDisplayed()) 680 if (startup_metric_utils::WasNonBrowserUIDisplayed())
685 return; 681 return;
686 682
687 #if defined(OS_ANDROID) 683 #if defined(OS_ANDROID)
688 // On Android the first run is handled in Java code, and the C++ side of 684 // On Android the first run is handled in Java code, and the C++ side of
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 chromeos::CrosSettings::Shutdown(); 1704 chromeos::CrosSettings::Shutdown();
1709 #endif 1705 #endif
1710 #endif 1706 #endif
1711 } 1707 }
1712 1708
1713 // Public members: 1709 // Public members:
1714 1710
1715 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1711 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1716 chrome_extra_parts_.push_back(parts); 1712 chrome_extra_parts_.push_back(parts);
1717 } 1713 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698