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 <map> | 5 #include <map> |
6 #include <set> | 6 #include <set> |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/prefs/scoped_user_pref_update.h" | 14 #include "base/prefs/scoped_user_pref_update.h" |
15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "build/build_config.h" |
18 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h
" | 19 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h
" |
19 #include "chrome/browser/supervised_user/supervised_user_site_list.h" | 20 #include "chrome/browser/supervised_user/supervised_user_site_list.h" |
20 #include "chrome/browser/supervised_user/supervised_user_whitelist_service.h" | 21 #include "chrome/browser/supervised_user/supervised_user_whitelist_service.h" |
21 #include "chrome/common/chrome_paths.h" | 22 #include "chrome/common/chrome_paths.h" |
22 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
23 #include "chrome/test/base/testing_profile.h" | 24 #include "chrome/test/base/testing_profile.h" |
24 #include "content/public/test/test_browser_thread_bundle.h" | 25 #include "content/public/test/test_browser_thread_bundle.h" |
25 #include "sync/api/sync_change.h" | 26 #include "sync/api/sync_change.h" |
26 #include "sync/api/sync_error_factory.h" | 27 #include "sync/api/sync_error_factory.h" |
27 #include "sync/protocol/sync.pb.h" | 28 #include "sync/protocol/sync.pb.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 service_->GetAllSyncData(syncer::SUPERVISED_USER_WHITELISTS); | 274 service_->GetAllSyncData(syncer::SUPERVISED_USER_WHITELISTS); |
274 ASSERT_EQ(2u, sync_data.size()); | 275 ASSERT_EQ(2u, sync_data.size()); |
275 const sync_pb::ManagedUserWhitelistSpecifics* whitelist = | 276 const sync_pb::ManagedUserWhitelistSpecifics* whitelist = |
276 FindWhitelist(sync_data, "aaaa"); | 277 FindWhitelist(sync_data, "aaaa"); |
277 ASSERT_TRUE(whitelist); | 278 ASSERT_TRUE(whitelist); |
278 EXPECT_EQ("Whitelist A", whitelist->name()); | 279 EXPECT_EQ("Whitelist A", whitelist->name()); |
279 whitelist = FindWhitelist(sync_data, "bbbb"); | 280 whitelist = FindWhitelist(sync_data, "bbbb"); |
280 ASSERT_TRUE(whitelist); | 281 ASSERT_TRUE(whitelist); |
281 EXPECT_EQ("Whitelist B", whitelist->name()); | 282 EXPECT_EQ("Whitelist B", whitelist->name()); |
282 } | 283 } |
OLD | NEW |