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

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

Issue 2831103002: Move shared constants to //components/chrome_cleaner (Closed)
Patch Set: Created 3 years, 8 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/component_updater/sw_reporter_installer_win_unittest.cc » ('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) 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 base::CommandLine command_line(argv); 244 base::CommandLine command_line(argv);
245 245
246 // Add a random session id to link experimental reporter runs together. 246 // Add a random session id to link experimental reporter runs together.
247 command_line.AppendSwitchASCII(chrome_cleaner::kSessionIdSwitch, 247 command_line.AppendSwitchASCII(chrome_cleaner::kSessionIdSwitch,
248 session_id); 248 session_id);
249 249
250 const std::string experiment_group = 250 const std::string experiment_group =
251 variations::GetVariationParamValueByFeature( 251 variations::GetVariationParamValueByFeature(
252 kExperimentalEngineFeature, "experiment_group_for_reporting"); 252 kExperimentalEngineFeature, "experiment_group_for_reporting");
253 command_line.AppendSwitchNative("engine-experiment-group", 253 command_line.AppendSwitchNative(
254 experiment_group.empty() 254 chrome_cleaner::kEngineExperimentGroupSwitch,
255 ? L"missing_experiment_group" 255 experiment_group.empty() ? L"missing_experiment_group"
256 : base::UTF8ToUTF16(experiment_group)); 256 : base::UTF8ToUTF16(experiment_group));
257 257
258 // Add the histogram suffix to the command-line as well, so that the 258 // Add the histogram suffix to the command-line as well, so that the
259 // reporter will add the same suffix to registry keys where it writes 259 // reporter will add the same suffix to registry keys where it writes
260 // metrics. 260 // metrics.
261 if (!suffix.empty()) 261 if (!suffix.empty())
262 command_line.AppendSwitchASCII("registry-suffix", suffix); 262 command_line.AppendSwitchASCII(chrome_cleaner::kRegistrySuffixSwitch,
263 suffix);
263 264
264 SwReporterInvocation::Behaviours supported_behaviours = 0; 265 SwReporterInvocation::Behaviours supported_behaviours = 0;
265 if (!GetOptionalBehaviour(invocation_params, "prompt", 266 if (!GetOptionalBehaviour(invocation_params, "prompt",
266 SwReporterInvocation::BEHAVIOUR_TRIGGER_PROMPT, 267 SwReporterInvocation::BEHAVIOUR_TRIGGER_PROMPT,
267 &supported_behaviours)) 268 &supported_behaviours))
268 return; 269 return;
269 if (!GetOptionalBehaviour( 270 if (!GetOptionalBehaviour(
270 invocation_params, "allow-reporter-logs", 271 invocation_params, "allow-reporter-logs",
271 SwReporterInvocation::BEHAVIOUR_ALLOW_SEND_REPORTER_LOGS, 272 SwReporterInvocation::BEHAVIOUR_ALLOW_SEND_REPORTER_LOGS,
272 &supported_behaviours)) 273 &supported_behaviours))
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 } 492 }
492 493
493 void RegisterProfilePrefsForSwReporter( 494 void RegisterProfilePrefsForSwReporter(
494 user_prefs::PrefRegistrySyncable* registry) { 495 user_prefs::PrefRegistrySyncable* registry) {
495 registry->RegisterStringPref(prefs::kSwReporterPromptVersion, ""); 496 registry->RegisterStringPref(prefs::kSwReporterPromptVersion, "");
496 497
497 registry->RegisterStringPref(prefs::kSwReporterPromptSeed, ""); 498 registry->RegisterStringPref(prefs::kSwReporterPromptSeed, "");
498 } 499 }
499 500
500 } // namespace component_updater 501 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698