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

Side by Side Diff: components/variations/processed_study.cc

Issue 412943002: Move variations component code to variations namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 5 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 | « components/variations/processed_study.h ('k') | components/variations/proto/study.proto » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/variations/processed_study.h" 5 #include "components/variations/processed_study.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/version.h" 10 #include "base/version.h"
11 #include "components/variations/proto/study.pb.h" 11 #include "components/variations/proto/study.pb.h"
12 12
13 namespace chrome_variations { 13 namespace variations {
14 14
15 namespace { 15 namespace {
16 16
17 // Validates the sanity of |study| and computes the total probability. 17 // Validates the sanity of |study| and computes the total probability.
18 bool ValidateStudyAndComputeTotalProbability( 18 bool ValidateStudyAndComputeTotalProbability(
19 const Study& study, 19 const Study& study,
20 base::FieldTrial::Probability* total_probability) { 20 base::FieldTrial::Probability* total_probability) {
21 // At the moment, a missing default_experiment_name makes the study invalid. 21 // At the moment, a missing default_experiment_name makes the study invalid.
22 if (study.default_experiment_name().empty()) { 22 if (study.default_experiment_name().empty()) {
23 DVLOG(1) << study.name() << " has no default experiment defined."; 23 DVLOG(1) << study.name() << " has no default experiment defined.";
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 bool is_expired, 107 bool is_expired,
108 std::vector<ProcessedStudy>* processed_studies) { 108 std::vector<ProcessedStudy>* processed_studies) {
109 ProcessedStudy processed_study; 109 ProcessedStudy processed_study;
110 if (processed_study.Init(study, is_expired)) { 110 if (processed_study.Init(study, is_expired)) {
111 processed_studies->push_back(processed_study); 111 processed_studies->push_back(processed_study);
112 return true; 112 return true;
113 } 113 }
114 return false; 114 return false;
115 } 115 }
116 116
117 } // namespace chrome_variations 117 } // namespace variations
OLDNEW
« no previous file with comments | « components/variations/processed_study.h ('k') | components/variations/proto/study.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698