OLD | NEW |
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 "chrome/common/metrics/variations_util.h" | 5 #include "chrome/common/metrics/variations/variations_util.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
11 #include "base/sha1.h" | 11 #include "base/sha1.h" |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
14 #include "base/sys_byteorder.h" | 14 #include "base/sys_byteorder.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "chrome/common/child_process_logging.h" | 16 #include "chrome/common/child_process_logging.h" |
17 #include "chrome/common/metrics/variation_ids.h" | 17 #include "chrome/common/metrics/variations/variation_ids.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // The internal singleton accessor for the map, used to keep it thread-safe. | 21 // The internal singleton accessor for the map, used to keep it thread-safe. |
22 class GroupMapAccessor { | 22 class GroupMapAccessor { |
23 public: | 23 public: |
24 // Retrieve the singleton. | 24 // Retrieve the singleton. |
25 static GroupMapAccessor* GetInstance() { | 25 static GroupMapAccessor* GetInstance() { |
26 return Singleton<GroupMapAccessor>::get(); | 26 return Singleton<GroupMapAccessor>::get(); |
27 } | 27 } |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 std::vector<chrome_variations::SelectedGroupId>* name_group_ids) { | 173 std::vector<chrome_variations::SelectedGroupId>* name_group_ids) { |
174 ::GetFieldTrialSelectedGroupIdsForSelectedGroups(selected_groups, | 174 ::GetFieldTrialSelectedGroupIdsForSelectedGroups(selected_groups, |
175 name_group_ids); | 175 name_group_ids); |
176 } | 176 } |
177 | 177 |
178 uint32 TestHashName(const std::string& name) { | 178 uint32 TestHashName(const std::string& name) { |
179 return ::HashName(name); | 179 return ::HashName(name); |
180 } | 180 } |
181 | 181 |
182 } // namespace testing | 182 } // namespace testing |
OLD | NEW |