| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <cstdlib> | 6 #include <cstdlib> |
| 7 #include <map> | 7 #include <map> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 const std::string os("linux"); | 171 const std::string os("linux"); |
| 172 #else | 172 #else |
| 173 #error "Unknown platform" | 173 #error "Unknown platform" |
| 174 #endif | 174 #endif |
| 175 return std::find(supported_os_.begin(), supported_os_.end(), os) != | 175 return std::find(supported_os_.begin(), supported_os_.end(), os) != |
| 176 supported_os_.end(); | 176 supported_os_.end(); |
| 177 } | 177 } |
| 178 void AddSupportedOs(const std::string& os) { supported_os_.push_back(os); } | 178 void AddSupportedOs(const std::string& os) { supported_os_.push_back(os); } |
| 179 | 179 |
| 180 bool IsSupported() const { | 180 bool IsSupported() const { |
| 181 #if !defined(OFFICIAL_BUILD) | 181 #if !defined(GOOGLE_CHROME_BUILD) |
| 182 if (is_official_only()) | 182 if (is_official_only()) |
| 183 return false; | 183 return false; |
| 184 #endif | 184 #endif |
| 185 return IsOsSupported(); | 185 return IsOsSupported(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 const base::DictionaryValue& test_policy() const { return test_policy_; } | 188 const base::DictionaryValue& test_policy() const { return test_policy_; } |
| 189 void SetTestPolicy(const base::DictionaryValue& policy) { | 189 void SetTestPolicy(const base::DictionaryValue& policy) { |
| 190 test_policy_.Clear(); | 190 test_policy_.Clear(); |
| 191 test_policy_.MergeDictionary(&policy); | 191 test_policy_.MergeDictionary(&policy); |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 } | 744 } |
| 745 } | 745 } |
| 746 } | 746 } |
| 747 } | 747 } |
| 748 | 748 |
| 749 INSTANTIATE_TEST_CASE_P(PolicyPrefIndicatorTestInstance, | 749 INSTANTIATE_TEST_CASE_P(PolicyPrefIndicatorTestInstance, |
| 750 PolicyPrefIndicatorTest, | 750 PolicyPrefIndicatorTest, |
| 751 testing::ValuesIn(SplitPoliciesIntoChunks(10))); | 751 testing::ValuesIn(SplitPoliciesIntoChunks(10))); |
| 752 | 752 |
| 753 } // namespace policy | 753 } // namespace policy |
| OLD | NEW |