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

Unified Diff: chrome/browser/policy/asynchronous_policy_loader.h

Issue 5748002: Fix memory leaks in AsynchronousPolicyProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review feedback Created 10 years 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
« no previous file with comments | « no previous file | chrome/browser/policy/asynchronous_policy_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/asynchronous_policy_loader.h
diff --git a/chrome/browser/policy/asynchronous_policy_loader.h b/chrome/browser/policy/asynchronous_policy_loader.h
index 260084713387524a7eec7c2d9212d6cd6f43a6f3..30878f5553b649845bfcfb744bab59e1fbabe906 100644
--- a/chrome/browser/policy/asynchronous_policy_loader.h
+++ b/chrome/browser/policy/asynchronous_policy_loader.h
@@ -47,15 +47,10 @@ class AsynchronousPolicyLoader
friend class base::RefCountedThreadSafe<AsynchronousPolicyLoader>;
virtual ~AsynchronousPolicyLoader() {}
- // Schedules a call to UpdatePolicy on |origin_loop_|.
+ // Schedules a call to UpdatePolicy on |origin_loop_|. Takes ownership of
+ // |new_policy|.
void PostUpdatePolicyTask(DictionaryValue* new_policy);
- // Replaces the existing policy to value map with a new one, sending
- // notification to the provider if there is a policy change. Must be called on
- // |origin_loop_| so that it's safe to call back into the provider, which is
- // not thread-safe.
- void UpdatePolicy(DictionaryValue* new_policy);
-
AsynchronousPolicyProvider::Delegate* delegate() {
return delegate_.get();
}
@@ -67,6 +62,12 @@ class AsynchronousPolicyLoader
private:
friend class AsynchronousPolicyLoaderTest;
+ // Replaces the existing policy to value map with a new one, sending
+ // notification to the provider if there is a policy change. Must be called on
+ // |origin_loop_| so that it's safe to call back into the provider, which is
+ // not thread-safe. Takes ownership of |new_policy|.
+ void UpdatePolicy(DictionaryValue* new_policy);
+
// Provides the low-level mechanics for loading policy.
scoped_ptr<AsynchronousPolicyProvider::Delegate> delegate_;
« no previous file with comments | « no previous file | chrome/browser/policy/asynchronous_policy_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698