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/sha1.h" | 12 #include "base/sha1.h" |
12 #include "base/task/sequenced_task_runner.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/resource_cache.h" | 18 #include "chrome/browser/policy/cloud/resource_cache.h" |
19 #include "chrome/browser/policy/policy_bundle.h" | 19 #include "chrome/browser/policy/policy_bundle.h" |
20 #include "chrome/browser/policy/policy_map.h" | 20 #include "chrome/browser/policy/policy_map.h" |
21 #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" | 22 #include "chrome/browser/policy/proto/cloud/chrome_extension_policy.pb.h" |
(...skipping 277 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 |