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

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: Rebase before submit 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
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_metrics_service_accessor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 } 669 }
670 670
671 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- 671 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related --------------
672 672
673 void ChromeBrowserMainParts::StartMetricsRecording() { 673 void ChromeBrowserMainParts::StartMetricsRecording() {
674 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); 674 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording");
675 675
676 g_browser_process->metrics_service()->CheckForClonedInstall( 676 g_browser_process->metrics_service()->CheckForClonedInstall(
677 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); 677 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
678 678
679 bool may_record = g_browser_process->GetMetricsServicesManager()-> 679 g_browser_process->GetMetricsServicesManager()->UpdateUploadPermissions(true);
680 IsMetricsReportingEnabled();
681
682 g_browser_process->GetMetricsServicesManager()->UpdatePermissions(
683 may_record, true);
684 } 680 }
685 681
686 void ChromeBrowserMainParts::RecordBrowserStartupTime() { 682 void ChromeBrowserMainParts::RecordBrowserStartupTime() {
687 // Don't record any metrics if UI was displayed before this point e.g. 683 // Don't record any metrics if UI was displayed before this point e.g.
688 // warning dialogs. 684 // warning dialogs.
689 if (startup_metric_utils::WasNonBrowserUIDisplayed()) 685 if (startup_metric_utils::WasNonBrowserUIDisplayed())
690 return; 686 return;
691 687
692 #if defined(OS_ANDROID) 688 #if defined(OS_ANDROID)
693 // On Android the first run is handled in Java code, and the C++ side of 689 // On Android the first run is handled in Java code, and the C++ side of
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 chromeos::CrosSettings::Shutdown(); 1717 chromeos::CrosSettings::Shutdown();
1722 #endif 1718 #endif
1723 #endif 1719 #endif
1724 } 1720 }
1725 1721
1726 // Public members: 1722 // Public members:
1727 1723
1728 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1724 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1729 chrome_extra_parts_.push_back(parts); 1725 chrome_extra_parts_.push_back(parts);
1730 } 1726 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_metrics_service_accessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698