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

Unified Diff: chrome/browser/policy/cloud_policy_provider_unittest.cc

Issue 8586030: Added ConfigurationPolicyProvider::RefreshPolicies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simpler AsyncLoader, fixed unit_tests, added connector::RefreshPolicies Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/cloud_policy_provider_unittest.cc
diff --git a/chrome/browser/policy/cloud_policy_provider_unittest.cc b/chrome/browser/policy/cloud_policy_provider_unittest.cc
index 1af50371ae893c5430b038b9a6e8f9a7761bef5d..c5dbf8448597c2ce6ab5633ccf34f4f423824b65 100644
--- a/chrome/browser/policy/cloud_policy_provider_unittest.cc
+++ b/chrome/browser/policy/cloud_policy_provider_unittest.cc
@@ -6,6 +6,7 @@
#include "base/basictypes.h"
#include "base/values.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/policy/cloud_policy_cache_base.h"
#include "chrome/browser/policy/cloud_policy_provider_impl.h"
#include "chrome/browser/policy/configuration_policy_pref_store.h"
@@ -47,10 +48,6 @@ class MockCloudPolicyCache : public CloudPolicyCacheBase {
is_unmanaged_ = true;
}
- void SetFetchingDone() {
- // Implement pure virtual method.
- }
-
void set_initialized(bool initialized) {
initialization_complete_ = initialized;
}
@@ -62,8 +59,11 @@ class MockCloudPolicyCache : public CloudPolicyCacheBase {
class CloudPolicyProviderTest : public testing::Test {
protected:
void CreateCloudPolicyProvider(CloudPolicyCacheBase::PolicyLevel level) {
- cloud_policy_provider_.reset(new CloudPolicyProviderImpl(
- GetChromePolicyDefinitionList(), level));
+ cloud_policy_provider_.reset(
+ new CloudPolicyProviderImpl(
+ g_browser_process->browser_policy_connector(),
Mattias Nissler (ping if slow) 2011/11/18 14:49:32 I see. Globals suck though, your call.
Joao da Silva 2011/11/18 15:39:18 Removed the static-ness out of BrowserPolicyConnec
+ GetChromePolicyDefinitionList(),
+ level));
}
// Appends the caches to a provider and then provides the policies to
@@ -71,6 +71,7 @@ class CloudPolicyProviderTest : public testing::Test {
void RunCachesThroughProvider(MockCloudPolicyCache caches[], int n,
CloudPolicyCacheBase::PolicyLevel level) {
CloudPolicyProviderImpl provider(
+ g_browser_process->browser_policy_connector(),
GetChromePolicyDefinitionList(),
level);
for (int i = 0; i < n; i++) {

Powered by Google App Engine
This is Rietveld 408576698