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

Unified Diff: chrome/browser/prefs/pref_hash_calculator.h

Issue 228763007: Revert of Improve computation of PrefHashCalculator::legacy_device_id_instance_. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « no previous file | chrome/browser/prefs/pref_hash_calculator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_hash_calculator.h
diff --git a/chrome/browser/prefs/pref_hash_calculator.h b/chrome/browser/prefs/pref_hash_calculator.h
index 53a39e580ac6157f11a07b97e9046975070aa2c0..1dd466181b8d8b8c5a1bcdbe15619f8c245b1d4b 100644
--- a/chrome/browser/prefs/pref_hash_calculator.h
+++ b/chrome/browser/prefs/pref_hash_calculator.h
@@ -9,7 +9,6 @@
#include "base/basictypes.h"
#include "base/callback.h"
-#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
namespace base {
@@ -73,10 +72,9 @@
const GetLegacyDeviceIdCallback get_legacy_device_id_callback_;
// A cache for the legacy device id which is hard to compute and thus lazily
- // computed when/if required. The same instance is used across all
- // PrefHashCalculators.
- static base::LazyInstance<scoped_ptr<const std::string> >::Leaky
- legacy_device_id_instance_;
+ // computed when/if required (computing the original value for this instance
+ // is allowed in const methods).
+ mutable scoped_ptr<const std::string> legacy_device_id_instance_;
DISALLOW_COPY_AND_ASSIGN(PrefHashCalculator);
};
« no previous file with comments | « no previous file | chrome/browser/prefs/pref_hash_calculator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698