OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/policy/cloud/component_cloud_policy_updater.h" | 5 #include "chrome/browser/policy/cloud/component_cloud_policy_updater.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/sequenced_task_runner.h" | 11 #include "base/sequenced_task_runner.h" |
12 #include "base/sha1.h" | 12 #include "base/sha1.h" |
13 #include "base/test/test_simple_task_runner.h" | 13 #include "base/test/test_simple_task_runner.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" | 15 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" |
16 #include "chrome/browser/policy/cloud/component_cloud_policy_store.h" | 16 #include "chrome/browser/policy/cloud/component_cloud_policy_store.h" |
17 #include "chrome/browser/policy/cloud/policy_builder.h" | 17 #include "chrome/browser/policy/cloud/policy_builder.h" |
18 #include "chrome/browser/policy/cloud/proto/chrome_extension_policy.pb.h" | |
19 #include "chrome/browser/policy/cloud/proto/device_management_backend.pb.h" | |
20 #include "chrome/browser/policy/cloud/resource_cache.h" | 18 #include "chrome/browser/policy/cloud/resource_cache.h" |
21 #include "chrome/browser/policy/policy_bundle.h" | 19 #include "chrome/browser/policy/policy_bundle.h" |
22 #include "chrome/browser/policy/policy_map.h" | 20 #include "chrome/browser/policy/policy_map.h" |
23 #include "chrome/browser/policy/policy_types.h" | 21 #include "chrome/browser/policy/policy_types.h" |
| 22 #include "chrome/browser/policy/proto/cloud/chrome_extension_policy.pb.h" |
| 23 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" |
24 #include "googleurl/src/gurl.h" | 24 #include "googleurl/src/gurl.h" |
25 #include "net/url_request/test_url_fetcher_factory.h" | 25 #include "net/url_request/test_url_fetcher_factory.h" |
26 #include "net/url_request/url_fetcher_delegate.h" | 26 #include "net/url_request/url_fetcher_delegate.h" |
27 #include "net/url_request/url_request_context_getter.h" | 27 #include "net/url_request/url_request_context_getter.h" |
28 #include "testing/gmock/include/gmock/gmock.h" | 28 #include "testing/gmock/include/gmock/gmock.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
30 | 30 |
31 namespace em = enterprise_management; | 31 namespace em = enterprise_management; |
32 | 32 |
33 using testing::Mock; | 33 using testing::Mock; |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 // Update the policy fetch response before the download has finished. The new | 300 // Update the policy fetch response before the download has finished. The new |
301 // policy fetch response has no download URL. | 301 // policy fetch response has no download URL. |
302 builder_.payload().Clear(); | 302 builder_.payload().Clear(); |
303 updater_->UpdateExternalPolicy(CreateResponse()); | 303 updater_->UpdateExternalPolicy(CreateResponse()); |
304 | 304 |
305 // Verify that the download is no longer running. | 305 // Verify that the download is no longer running. |
306 ASSERT_FALSE(fetcher_factory_.GetFetcherByID(0)); | 306 ASSERT_FALSE(fetcher_factory_.GetFetcherByID(0)); |
307 } | 307 } |
308 | 308 |
309 } // namespace policy | 309 } // namespace policy |
OLD | NEW |