Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
|
blundell
2015/07/23 13:50:43
and this one?
gab
2015/07/23 21:41:16
Yes, though I assume the dependency on ProfilePref
blundell
2015/07/24 08:28:52
Good catch. That dependence is just to call Profil
Jitu( very slow this week)
2015/07/24 09:09:23
Done.
| |
| 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/browser/prefs/tracked/tracked_preferences_migration.h" | 5 #include "components/prefs_tracker/tracked_preferences_migration.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/prefs/testing_pref_service.h" | 14 #include "base/prefs/testing_pref_service.h" |
| 15 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "chrome/browser/prefs/profile_pref_store_manager.h" | 17 #include "chrome/browser/prefs/profile_pref_store_manager.h" |
| 18 #include "chrome/browser/prefs/tracked/dictionary_hash_store_contents.h" | 18 #include "components/prefs_tracker/dictionary_hash_store_contents.h" |
| 19 #include "chrome/browser/prefs/tracked/hash_store_contents.h" | 19 #include "components/prefs_tracker/hash_store_contents.h" |
| 20 #include "chrome/browser/prefs/tracked/interceptable_pref_filter.h" | 20 #include "components/prefs_tracker/interceptable_pref_filter.h" |
| 21 #include "chrome/browser/prefs/tracked/pref_hash_store.h" | 21 #include "components/prefs_tracker/pref_hash_store.h" |
| 22 #include "chrome/browser/prefs/tracked/pref_hash_store_impl.h" | 22 #include "components/prefs_tracker/pref_hash_store_impl.h" |
| 23 #include "chrome/browser/prefs/tracked/pref_hash_store_transaction.h" | 23 #include "components/prefs_tracker/pref_hash_store_transaction.h" |
| 24 #include "chrome/browser/prefs/tracked/pref_service_hash_store_contents.h" | 24 #include "components/prefs_tracker/pref_service_hash_store_contents.h" |
| 25 #include "chrome/browser/prefs/tracked/tracked_preferences_migration.h" | 25 #include "components/prefs_tracker/tracked_preferences_migration.h" |
| 26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 // An unprotected pref. | 30 // An unprotected pref. |
| 31 const char kUnprotectedPref[] = "unprotected"; | 31 const char kUnprotectedPref[] = "unprotected"; |
| 32 // A protected pref. | 32 // A protected pref. |
| 33 const char kProtectedPref[] = "protected"; | 33 const char kProtectedPref[] = "protected"; |
| 34 // A protected pref which is initially stored in the unprotected store. | 34 // A protected pref which is initially stored in the unprotected store. |
| 35 const char kPreviouslyUnprotectedPref[] = "previously.unprotected"; | 35 const char kPreviouslyUnprotectedPref[] = "previously.unprotected"; |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 897 expected_unprotected_values); | 897 expected_unprotected_values); |
| 898 | 898 |
| 899 base::StringPairs expected_protected_values; | 899 base::StringPairs expected_protected_values; |
| 900 expected_protected_values.push_back(std::make_pair( | 900 expected_protected_values.push_back(std::make_pair( |
| 901 kProtectedPref, kProtectedPrefValue)); | 901 kProtectedPref, kProtectedPrefValue)); |
| 902 expected_protected_values.push_back(std::make_pair( | 902 expected_protected_values.push_back(std::make_pair( |
| 903 kPreviouslyUnprotectedPref, kPreviouslyUnprotectedPrefValue)); | 903 kPreviouslyUnprotectedPref, kPreviouslyUnprotectedPrefValue)); |
| 904 VerifyValuesStored(MOCK_PROTECTED_PREF_STORE, expected_protected_values); | 904 VerifyValuesStored(MOCK_PROTECTED_PREF_STORE, expected_protected_values); |
| 905 } | 905 } |
| 906 } | 906 } |
| OLD | NEW |