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

Unified Diff: chrome/browser/extensions/external_registry_loader_win.h

Issue 2796783002: [Ext Registry] Do not try to re-watch registry if we are already watching it. (Closed)
Patch Set: add test Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/external_registry_loader_win.h
diff --git a/chrome/browser/extensions/external_registry_loader_win.h b/chrome/browser/extensions/external_registry_loader_win.h
index e14fb864adcbb1b492f8a47d5107241f8257da95..af2bee07ca55e69af212c983d36e44f70023f905 100644
--- a/chrome/browser/extensions/external_registry_loader_win.h
+++ b/chrome/browser/extensions/external_registry_loader_win.h
@@ -17,13 +17,13 @@ class ExternalRegistryLoader : public ExternalLoader {
ExternalRegistryLoader() {}
protected:
+ ~ExternalRegistryLoader() override {} // protected for unit test.
+
void StartLoading() override;
private:
friend class base::RefCountedThreadSafe<ExternalLoader>;
- ~ExternalRegistryLoader() override {}
-
std::unique_ptr<base::DictionaryValue> LoadPrefsOnFileThread();
void LoadOnFileThread();
void CompleteLoadAndStartWatchingRegistry();
@@ -31,7 +31,12 @@ class ExternalRegistryLoader : public ExternalLoader {
void OnRegistryKeyChanged(base::win::RegKey* key);
base::win::RegKey hklm_key_;
+ // Whether or not HKLM registry watching is active.
+ bool is_watching_hklm_;
+
base::win::RegKey hkcu_key_;
+ // Whether or not HKCU registry watching is active.
+ bool is_watching_hkcu_;
DISALLOW_COPY_AND_ASSIGN(ExternalRegistryLoader);
};

Powered by Google App Engine
This is Rietveld 408576698