| 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 "components/user_prefs/tracked/segregated_pref_store.h" | 5 #include "components/user_prefs/tracked/segregated_pref_store.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 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/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/prefs/persistent_pref_store.h" | |
| 16 #include "base/prefs/pref_store_observer_mock.h" | |
| 17 #include "base/prefs/testing_pref_store.h" | |
| 18 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "components/prefs/persistent_pref_store.h" |
| 17 #include "components/prefs/pref_store_observer_mock.h" |
| 18 #include "components/prefs/testing_pref_store.h" |
| 19 #include "components/user_prefs/tracked/segregated_pref_store.h" | 19 #include "components/user_prefs/tracked/segregated_pref_store.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 const char kSelectedPref[] = "selected_pref"; | 24 const char kSelectedPref[] = "selected_pref"; |
| 25 const char kUnselectedPref[] = "unselected_pref"; | 25 const char kUnselectedPref[] = "unselected_pref"; |
| 26 | 26 |
| 27 const char kValue1[] = "value1"; | 27 const char kValue1[] = "value1"; |
| 28 const char kValue2[] = "value2"; | 28 const char kValue2[] = "value2"; |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 selected_store_->SetBlockAsyncRead(true); | 265 selected_store_->SetBlockAsyncRead(true); |
| 266 default_store_->SetBlockAsyncRead(true); | 266 default_store_->SetBlockAsyncRead(true); |
| 267 EXPECT_FALSE(segregated_store_->IsInitializationComplete()); | 267 EXPECT_FALSE(segregated_store_->IsInitializationComplete()); |
| 268 segregated_store_->ReadPrefsAsync(NULL); | 268 segregated_store_->ReadPrefsAsync(NULL); |
| 269 EXPECT_FALSE(segregated_store_->IsInitializationComplete()); | 269 EXPECT_FALSE(segregated_store_->IsInitializationComplete()); |
| 270 selected_store_->SetBlockAsyncRead(false); | 270 selected_store_->SetBlockAsyncRead(false); |
| 271 EXPECT_FALSE(segregated_store_->IsInitializationComplete()); | 271 EXPECT_FALSE(segregated_store_->IsInitializationComplete()); |
| 272 default_store_->SetBlockAsyncRead(false); | 272 default_store_->SetBlockAsyncRead(false); |
| 273 EXPECT_TRUE(segregated_store_->IsInitializationComplete()); | 273 EXPECT_TRUE(segregated_store_->IsInitializationComplete()); |
| 274 } | 274 } |
| OLD | NEW |