| OLD | NEW |
| 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/variations_associated_data.h" | 5 #include "components/variations/variations_associated_data.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 12 | 12 |
| 13 namespace chrome_variations { | 13 namespace variations { |
| 14 | |
| 15 // TODO(asvitkine): Delete these when this file moves to variations namespace. | |
| 16 using variations::ActiveGroupId; | |
| 17 using variations::ActiveGroupIdCompare; | |
| 18 using variations::MakeActiveGroupId; | |
| 19 | 14 |
| 20 namespace { | 15 namespace { |
| 21 | 16 |
| 22 // The internal singleton accessor for the map, used to keep it thread-safe. | 17 // The internal singleton accessor for the map, used to keep it thread-safe. |
| 23 class GroupMapAccessor { | 18 class GroupMapAccessor { |
| 24 public: | 19 public: |
| 25 typedef std::map<ActiveGroupId, VariationID, ActiveGroupIdCompare> | 20 typedef std::map<ActiveGroupId, VariationID, ActiveGroupIdCompare> |
| 26 GroupToIDMap; | 21 GroupToIDMap; |
| 27 | 22 |
| 28 // Retrieve the singleton. | 23 // Retrieve the singleton. |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 void ClearAllVariationIDs() { | 227 void ClearAllVariationIDs() { |
| 233 GroupMapAccessor::GetInstance()->ClearAllMapsForTesting(); | 228 GroupMapAccessor::GetInstance()->ClearAllMapsForTesting(); |
| 234 } | 229 } |
| 235 | 230 |
| 236 void ClearAllVariationParams() { | 231 void ClearAllVariationParams() { |
| 237 VariationsParamAssociator::GetInstance()->ClearAllParamsForTesting(); | 232 VariationsParamAssociator::GetInstance()->ClearAllParamsForTesting(); |
| 238 } | 233 } |
| 239 | 234 |
| 240 } // namespace testing | 235 } // namespace testing |
| 241 | 236 |
| 242 } // namespace chrome_variations | 237 } // namespace variations |
| OLD | NEW |