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

Side by Side Diff: base/metrics/field_trial.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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 | Annotate | Revision Log
« no previous file with comments | « base/json/json_value_serializer_unittest.cc ('k') | base/metrics/field_trial_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) 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 "base/metrics/field_trial.h" 5 #include "base/metrics/field_trial.h"
6 6
7 #include "base/build_time.h" 7 #include "base/build_time.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/sha1.h" 10 #include "base/sha1.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 if (field_trial) 311 if (field_trial)
312 return field_trial->group(); 312 return field_trial->group();
313 return FieldTrial::kNotFinalized; 313 return FieldTrial::kNotFinalized;
314 } 314 }
315 315
316 // static 316 // static
317 std::string FieldTrialList::FindFullName(const std::string& name) { 317 std::string FieldTrialList::FindFullName(const std::string& name) {
318 FieldTrial* field_trial = Find(name); 318 FieldTrial* field_trial = Find(name);
319 if (field_trial) 319 if (field_trial)
320 return field_trial->group_name(); 320 return field_trial->group_name();
321 return ""; 321 return std::string();
322 } 322 }
323 323
324 // static 324 // static
325 bool FieldTrialList::TrialExists(const std::string& name) { 325 bool FieldTrialList::TrialExists(const std::string& name) {
326 return Find(name) != NULL; 326 return Find(name) != NULL;
327 } 327 }
328 328
329 // static 329 // static
330 void FieldTrialList::StatesToString(std::string* output) { 330 void FieldTrialList::StatesToString(std::string* output) {
331 FieldTrial::ActiveGroups active_groups; 331 FieldTrial::ActiveGroups active_groups;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 used_without_global_ = true; 483 used_without_global_ = true;
484 return; 484 return;
485 } 485 }
486 AutoLock auto_lock(global_->lock_); 486 AutoLock auto_lock(global_->lock_);
487 DCHECK(!global_->PreLockedFind(trial->trial_name())); 487 DCHECK(!global_->PreLockedFind(trial->trial_name()));
488 trial->AddRef(); 488 trial->AddRef();
489 global_->registered_[trial->trial_name()] = trial; 489 global_->registered_[trial->trial_name()] = trial;
490 } 490 }
491 491
492 } // namespace base 492 } // namespace base
OLDNEW
« no previous file with comments | « base/json/json_value_serializer_unittest.cc ('k') | base/metrics/field_trial_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698