Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: chrome/browser/policy/policy_service_impl.cc

Issue 78763002: Move PolicyMap and its dependencies to components/policy/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/policy_service_impl.h" 5 #include "chrome/browser/policy/policy_service_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/stl_util.h" 11 #include "base/stl_util.h"
12 #include "chrome/browser/policy/policy_map.h" 12 #include "components/policy/core/common/policy_map.h"
13 13
14 namespace policy { 14 namespace policy {
15 15
16 typedef PolicyServiceImpl::Providers::const_iterator Iterator; 16 typedef PolicyServiceImpl::Providers::const_iterator Iterator;
17 17
18 PolicyServiceImpl::PolicyServiceImpl(const Providers& providers) 18 PolicyServiceImpl::PolicyServiceImpl(const Providers& providers)
19 : update_task_ptr_factory_(this) { 19 : update_task_ptr_factory_(this) {
20 for (int domain = 0; domain < POLICY_DOMAIN_SIZE; ++domain) 20 for (int domain = 0; domain < POLICY_DOMAIN_SIZE; ++domain)
21 initialization_complete_[domain] = true; 21 initialization_complete_[domain] = true;
22 providers_ = providers; 22 providers_ = providers;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (refresh_pending_.empty() && !refresh_callbacks_.empty()) { 204 if (refresh_pending_.empty() && !refresh_callbacks_.empty()) {
205 std::vector<base::Closure> callbacks; 205 std::vector<base::Closure> callbacks;
206 callbacks.swap(refresh_callbacks_); 206 callbacks.swap(refresh_callbacks_);
207 std::vector<base::Closure>::iterator it; 207 std::vector<base::Closure>::iterator it;
208 for (it = callbacks.begin(); it != callbacks.end(); ++it) 208 for (it = callbacks.begin(); it != callbacks.end(); ++it)
209 it->Run(); 209 it->Run();
210 } 210 }
211 } 211 }
212 212
213 } // namespace policy 213 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698