OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/chromeos/policy/cloud_external_data_manager_base.h" | 5 #include "chrome/browser/chromeos/policy/cloud_external_data_manager_base.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/location.h" | 14 #include "base/location.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/message_loop/message_loop_proxy.h" | 16 #include "base/message_loop/message_loop_proxy.h" |
17 #include "base/sequenced_task_runner.h" | 17 #include "base/sequenced_task_runner.h" |
18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
19 #include "base/values.h" | 19 #include "base/values.h" |
20 #include "chrome/browser/chromeos/policy/cloud_external_data_store.h" | 20 #include "chrome/browser/chromeos/policy/cloud_external_data_store.h" |
21 #include "chrome/browser/policy/cloud/cloud_policy_store.h" | 21 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
22 #include "chrome/browser/policy/cloud/external_policy_data_fetcher.h" | 22 #include "components/policy/core/common/cloud/external_policy_data_fetcher.h" |
23 #include "chrome/browser/policy/cloud/external_policy_data_updater.h" | 23 #include "components/policy/core/common/cloud/external_policy_data_updater.h" |
24 #include "components/policy/core/common/external_data_fetcher.h" | 24 #include "components/policy/core/common/external_data_fetcher.h" |
25 #include "components/policy/core/common/policy_map.h" | 25 #include "components/policy/core/common/policy_map.h" |
26 #include "net/url_request/url_request_context_getter.h" | 26 #include "net/url_request/url_request_context_getter.h" |
27 | 27 |
28 namespace policy { | 28 namespace policy { |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 // Fetch data for at most two external data references at the same time. | 32 // Fetch data for at most two external data references at the same time. |
33 const int kMaxParallelFetches = 2; | 33 const int kMaxParallelFetches = 2; |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 max_external_data_size_for_testing = max_size; | 440 max_external_data_size_for_testing = max_size; |
441 } | 441 } |
442 | 442 |
443 void CloudExternalDataManagerBase::FetchAll() { | 443 void CloudExternalDataManagerBase::FetchAll() { |
444 DCHECK(CalledOnValidThread()); | 444 DCHECK(CalledOnValidThread()); |
445 backend_task_runner_->PostTask(FROM_HERE, base::Bind( | 445 backend_task_runner_->PostTask(FROM_HERE, base::Bind( |
446 &Backend::FetchAll, base::Unretained(backend_.get()))); | 446 &Backend::FetchAll, base::Unretained(backend_.get()))); |
447 } | 447 } |
448 | 448 |
449 } // namespace policy | 449 } // namespace policy |
OLD | NEW |