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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.h

Issue 881413003: Make SDCH dictionaries persistent across browser restart. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated Matt's comments. Created 5 years, 11 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/profiles/profile_impl_io_data.h
diff --git a/chrome/browser/profiles/profile_impl_io_data.h b/chrome/browser/profiles/profile_impl_io_data.h
index 68b8260e43e88f9beb701d3d3bed1b1b0d7105d7..e8e8361a2d73d1038007f75b7867d57da8cf2400 100644
--- a/chrome/browser/profiles/profile_impl_io_data.h
+++ b/chrome/browser/profiles/profile_impl_io_data.h
@@ -9,11 +9,15 @@
#include "base/callback.h"
#include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h"
+#include "base/prefs/pref_store.h"
+#include "base/timer/timer.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/net/chrome_url_request_context_getter.h"
#include "chrome/browser/profiles/profile_io_data.h"
#include "content/public/browser/cookie_store_factory.h"
+class JsonPrefStore;
+
namespace chrome_browser_net {
class Predictor;
} // namespace chrome_browser_net
@@ -44,7 +48,7 @@ namespace storage {
class SpecialStoragePolicy;
} // namespace storage
-class ProfileImplIOData : public ProfileIOData {
+class ProfileImplIOData : public ProfileIOData, public PrefStore::Observer {
public:
class Handle {
public:
@@ -209,12 +213,21 @@ class ProfileImplIOData : public ProfileIOData {
void ClearNetworkingHistorySinceOnIOThread(base::Time time,
const base::Closure& completion);
+ void FlushPrefsToDisk();
+
+ // PrefStore::Observer
+ void OnPrefValueChanged(const std::string& key) override;
+ void OnInitializationCompleted(bool succeeded) override;
+
mutable scoped_ptr<data_reduction_proxy::DataReductionProxyNetworkDelegate>
network_delegate_;
// Lazy initialization params.
mutable scoped_ptr<LazyParams> lazy_params_;
+ mutable scoped_refptr<JsonPrefStore> network_json_store_;
+ base::Timer network_store_commit_timer_;
+
mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_;
mutable scoped_ptr<net::FtpTransactionFactory> ftp_factory_;
@@ -240,6 +253,8 @@ class ProfileImplIOData : public ProfileIOData {
int app_cache_max_size_;
int app_media_cache_max_size_;
+ base::WeakPtrFactory<ProfileImplIOData> factory_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData);
};
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | chrome/browser/profiles/profile_impl_io_data.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698