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

Side by Side Diff: remoting/host/policy_watcher.cc

Issue 2764333003: Support PolicyWatcher with custom loader for testing (Closed)
Patch Set: Created 3 years, 9 months 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
« no previous file with comments | « remoting/host/policy_watcher.h ('k') | remoting/host/policy_watcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // Most of this code is copied from: 5 // Most of this code is copied from:
6 // src/chrome/browser/policy/asynchronous_policy_loader.{h,cc} 6 // src/chrome/browser/policy/asynchronous_policy_loader.{h,cc}
7 7
8 #include "remoting/host/policy_watcher.h" 8 #include "remoting/host/policy_watcher.h"
9 9
10 #include <utility> 10 #include <utility>
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 owned_policy_service.get(), std::move(owned_policy_service), nullptr, 383 owned_policy_service.get(), std::move(owned_policy_service), nullptr,
384 CreateSchemaRegistry())); 384 CreateSchemaRegistry()));
385 #else 385 #else
386 #error OS that is not yet supported by PolicyWatcher code. 386 #error OS that is not yet supported by PolicyWatcher code.
387 #endif 387 #endif
388 388
389 return PolicyWatcher::CreateFromPolicyLoader(std::move(policy_loader)); 389 return PolicyWatcher::CreateFromPolicyLoader(std::move(policy_loader));
390 #endif // !(OS_CHROMEOS) 390 #endif // !(OS_CHROMEOS)
391 } 391 }
392 392
393 std::unique_ptr<PolicyWatcher> PolicyWatcher::CreateFromPolicyLoaderForTesting(
394 std::unique_ptr<policy::AsyncPolicyLoader> async_policy_loader) {
395 return CreateFromPolicyLoader(std::move(async_policy_loader));
396 }
397
393 } // namespace remoting 398 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/policy_watcher.h ('k') | remoting/host/policy_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698