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

Side by Side Diff: chrome/browser/component_updater/sw_reporter_installer_win.cc

Issue 573733002: Properly abort SwReporter setup if user isn't in UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | no next file » | 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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/component_updater/sw_reporter_installer_win.h" 5 #include "chrome/browser/component_updater/sw_reporter_installer_win.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 static wchar_t version_dir_[_MAX_PATH]; 217 static wchar_t version_dir_[_MAX_PATH];
218 }; 218 };
219 219
220 wchar_t SwReporterInstallerTraits::version_dir_[] = {}; 220 wchar_t SwReporterInstallerTraits::version_dir_[] = {};
221 221
222 } // namespace 222 } // namespace
223 223
224 void RegisterSwReporterComponent(ComponentUpdateService* cus, 224 void RegisterSwReporterComponent(ComponentUpdateService* cus,
225 PrefService* prefs) { 225 PrefService* prefs) {
226 // The Sw reporter shouldn't run if the user isn't reporting metrics. 226 // The Sw reporter shouldn't run if the user isn't reporting metrics.
227 if (!ChromeMetricsServiceAccessor::IsMetricsReportingEnabled() && false) 227 if (!ChromeMetricsServiceAccessor::IsMetricsReportingEnabled())
228 return; 228 return;
229 229
230 // Install the component. 230 // Install the component.
231 scoped_ptr<ComponentInstallerTraits> traits( 231 scoped_ptr<ComponentInstallerTraits> traits(
232 new SwReporterInstallerTraits(prefs)); 232 new SwReporterInstallerTraits(prefs));
233 // |cus| will take ownership of |installer| during installer->Register(cus). 233 // |cus| will take ownership of |installer| during installer->Register(cus).
234 DefaultComponentInstaller* installer = 234 DefaultComponentInstaller* installer =
235 new DefaultComponentInstaller(traits.Pass()); 235 new DefaultComponentInstaller(traits.Pass());
236 installer->Register(cus); 236 installer->Register(cus);
237 } 237 }
238 238
239 void RegisterPrefsForSwReporter(PrefRegistrySimple* registry) { 239 void RegisterPrefsForSwReporter(PrefRegistrySimple* registry) {
240 registry->RegisterInt64Pref(prefs::kSwReporterLastTimeTriggered, 0); 240 registry->RegisterInt64Pref(prefs::kSwReporterLastTimeTriggered, 0);
241 } 241 }
242 242
243 } // namespace component_updater 243 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698