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

Side by Side Diff: components/metrics/metrics_state_manager.cc

Issue 2332393002: Remove unnecessary comment in metrics code (Closed)
Patch Set: Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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 "components/metrics/metrics_state_manager.h" 5 #include "components/metrics/metrics_state_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/guid.h" 10 #include "base/guid.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } else { 254 } else {
255 client_id_with_dashes.push_back(*client_id_it); 255 client_id_with_dashes.push_back(*client_id_it);
256 ++client_id_it; 256 ++client_id_it;
257 } 257 }
258 } 258 }
259 DCHECK(client_id_it == client_info->client_id.end()); 259 DCHECK(client_id_it == client_info->client_id.end());
260 client_info->client_id.assign(client_id_with_dashes); 260 client_info->client_id.assign(client_id_with_dashes);
261 } 261 }
262 262
263 // The GUID retrieved (and possibly fixed above) should be valid unless 263 // The GUID retrieved (and possibly fixed above) should be valid unless
264 // retrieval failed. 264 // retrieval failed. If not, return nullptr and generate a new GUID.
Alexei Svitkine (slow) 2016/09/13 17:38:36 "and generate a new GUID" part of the comment is c
265 // DCHECK(!client_info || base::IsValidGUID(client_info->client_id));
266 // Temporary hack for http://crbug.com/635255.
267 // TODO(asvitkine): address this the right way.
268 if (client_info && !base::IsValidGUID(client_info->client_id)) 265 if (client_info && !base::IsValidGUID(client_info->client_id))
269 return nullptr; 266 return nullptr;
270 267
271 return client_info; 268 return client_info;
272 } 269 }
273 270
274 int MetricsStateManager::GetLowEntropySource() { 271 int MetricsStateManager::GetLowEntropySource() {
275 UpdateLowEntropySource(); 272 UpdateLowEntropySource();
276 return low_entropy_source_; 273 return low_entropy_source_;
277 } 274 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 323
327 local_state_->ClearPref(prefs::kMetricsClientID); 324 local_state_->ClearPref(prefs::kMetricsClientID);
328 local_state_->ClearPref(prefs::kMetricsLowEntropySource); 325 local_state_->ClearPref(prefs::kMetricsLowEntropySource);
329 local_state_->ClearPref(prefs::kMetricsResetIds); 326 local_state_->ClearPref(prefs::kMetricsResetIds);
330 327
331 // Also clear the backed up client info. 328 // Also clear the backed up client info.
332 store_client_info_.Run(ClientInfo()); 329 store_client_info_.Run(ClientInfo());
333 } 330 }
334 331
335 } // namespace metrics 332 } // namespace metrics
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