| 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 variations { | 13 namespace chrome_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; |
| 14 | 19 |
| 15 namespace { | 20 namespace { |
| 16 | 21 |
| 17 // The internal singleton accessor for the map, used to keep it thread-safe. | 22 // The internal singleton accessor for the map, used to keep it thread-safe. |
| 18 class GroupMapAccessor { | 23 class GroupMapAccessor { |
| 19 public: | 24 public: |
| 20 typedef std::map<ActiveGroupId, VariationID, ActiveGroupIdCompare> | 25 typedef std::map<ActiveGroupId, VariationID, ActiveGroupIdCompare> |
| 21 GroupToIDMap; | 26 GroupToIDMap; |
| 22 | 27 |
| 23 // Retrieve the singleton. | 28 // Retrieve the singleton. |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 void ClearAllVariationIDs() { | 232 void ClearAllVariationIDs() { |
| 228 GroupMapAccessor::GetInstance()->ClearAllMapsForTesting(); | 233 GroupMapAccessor::GetInstance()->ClearAllMapsForTesting(); |
| 229 } | 234 } |
| 230 | 235 |
| 231 void ClearAllVariationParams() { | 236 void ClearAllVariationParams() { |
| 232 VariationsParamAssociator::GetInstance()->ClearAllParamsForTesting(); | 237 VariationsParamAssociator::GetInstance()->ClearAllParamsForTesting(); |
| 233 } | 238 } |
| 234 | 239 |
| 235 } // namespace testing | 240 } // namespace testing |
| 236 | 241 |
| 237 } // namespace variations | 242 } // namespace chrome_variations |
| OLD | NEW |