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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
12 #include "base/json/json_file_value_serializer.h" | 12 #include "base/json/json_file_value_serializer.h" |
13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
14 #include "base/json/json_writer.h" | 14 #include "base/json/json_writer.h" |
15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/prefs/testing_pref_service.h" | |
18 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
19 #include "base/sequenced_task_runner.h" | 18 #include "base/sequenced_task_runner.h" |
20 #include "base/strings/string_util.h" | 19 #include "base/strings/string_util.h" |
21 #include "base/test/scoped_path_override.h" | 20 #include "base/test/scoped_path_override.h" |
22 #include "base/thread_task_runner_handle.h" | 21 #include "base/thread_task_runner_handle.h" |
23 #include "base/values.h" | 22 #include "base/values.h" |
24 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h
" | 23 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h
" |
25 #include "chrome/common/chrome_paths.h" | 24 #include "chrome/common/chrome_paths.h" |
26 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
27 #include "components/component_updater/component_updater_paths.h" | 26 #include "components/component_updater/component_updater_paths.h" |
28 #include "components/component_updater/component_updater_service.h" | 27 #include "components/component_updater/component_updater_service.h" |
29 #include "components/crx_file/id_util.h" | 28 #include "components/crx_file/id_util.h" |
| 29 #include "components/prefs/testing_pref_service.h" |
30 #include "components/safe_json/testing_json_parser.h" | 30 #include "components/safe_json/testing_json_parser.h" |
31 #include "components/update_client/crx_update_item.h" | 31 #include "components/update_client/crx_update_item.h" |
32 #include "components/update_client/update_client.h" | 32 #include "components/update_client/update_client.h" |
33 #include "components/update_client/utils.h" | 33 #include "components/update_client/utils.h" |
34 #include "testing/gmock/include/gmock/gmock.h" | 34 #include "testing/gmock/include/gmock/gmock.h" |
35 #include "testing/gtest/include/gtest/gtest.h" | 35 #include "testing/gtest/include/gtest/gtest.h" |
36 | 36 |
37 using update_client::CrxComponent; | 37 using update_client::CrxComponent; |
38 using update_client::CrxUpdateItem; | 38 using update_client::CrxUpdateItem; |
39 | 39 |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 base::RunLoop run_loop; | 378 base::RunLoop run_loop; |
379 installer_->UnregisterWhitelist(kOtherClientId, kCrxId); | 379 installer_->UnregisterWhitelist(kOtherClientId, kCrxId); |
380 run_loop.RunUntilIdle(); | 380 run_loop.RunUntilIdle(); |
381 } | 381 } |
382 EXPECT_FALSE(component_update_service_.registered_component()); | 382 EXPECT_FALSE(component_update_service_.registered_component()); |
383 EXPECT_FALSE(base::DirectoryExists(whitelist_directory_)); | 383 EXPECT_FALSE(base::DirectoryExists(whitelist_directory_)); |
384 EXPECT_FALSE(base::PathExists(whitelist_path_)); | 384 EXPECT_FALSE(base::PathExists(whitelist_path_)); |
385 } | 385 } |
386 | 386 |
387 } // namespace component_updater | 387 } // namespace component_updater |
OLD | NEW |