| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/prefs/profile_pref_store_manager.h" | 5 #include "chrome/browser/prefs/profile_pref_store_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include <vector> | 9 #include <vector> |
| 8 | 10 |
| 9 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 10 #include "base/files/file_enumerator.h" | 12 #include "base/files/file_enumerator.h" |
| 11 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
| 12 #include "base/files/scoped_temp_dir.h" | 14 #include "base/files/scoped_temp_dir.h" |
| 15 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/prefs/json_pref_store.h" | 18 #include "base/prefs/json_pref_store.h" |
| 16 #include "base/prefs/persistent_pref_store.h" | 19 #include "base/prefs/persistent_pref_store.h" |
| 17 #include "base/prefs/pref_service.h" | 20 #include "base/prefs/pref_service.h" |
| 18 #include "base/prefs/pref_service_factory.h" | 21 #include "base/prefs/pref_service_factory.h" |
| 19 #include "base/prefs/pref_store.h" | 22 #include "base/prefs/pref_store.h" |
| 20 #include "base/prefs/testing_pref_service.h" | 23 #include "base/prefs/testing_pref_service.h" |
| 21 #include "base/run_loop.h" | 24 #include "base/run_loop.h" |
| 22 #include "base/strings/string_util.h" | 25 #include "base/strings/string_util.h" |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 | 570 |
| 568 // Trigger the logic that migrates it back to the unprotected preferences | 571 // Trigger the logic that migrates it back to the unprotected preferences |
| 569 // file. | 572 // file. |
| 570 pref_store_->SetValue(kProtectedAtomic, | 573 pref_store_->SetValue(kProtectedAtomic, |
| 571 make_scoped_ptr(new base::StringValue(kGoodbyeWorld)), | 574 make_scoped_ptr(new base::StringValue(kGoodbyeWorld)), |
| 572 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); | 575 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); |
| 573 LoadExistingPrefs(); | 576 LoadExistingPrefs(); |
| 574 ExpectStringValueEquals(kProtectedAtomic, kGoodbyeWorld); | 577 ExpectStringValueEquals(kProtectedAtomic, kGoodbyeWorld); |
| 575 VerifyResetRecorded(false); | 578 VerifyResetRecorded(false); |
| 576 } | 579 } |
| OLD | NEW |