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

Unified Diff: components/cronet/android/url_request_context_adapter.h

Issue 1133883002: [Cronet] Enable persistence mode for Sdch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@quic_server_remove_loop
Patch Set: Addressed Misha's comments Created 5 years, 7 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: components/cronet/android/url_request_context_adapter.h
diff --git a/components/cronet/android/url_request_context_adapter.h b/components/cronet/android/url_request_context_adapter.h
index 539a76afde093974f3e59cb3dcb620e5bcfd9527..48cb5c7721f020041188a50ac02eaabfd51d94fa 100644
--- a/components/cronet/android/url_request_context_adapter.h
+++ b/components/cronet/android/url_request_context_adapter.h
@@ -14,6 +14,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/prefs/json_pref_store.h"
#include "base/threading/thread.h"
#include "net/log/net_log.h"
#include "net/url_request/url_request_context.h"
@@ -99,14 +100,20 @@ class URLRequestContextAdapter : public net::URLRequestContextGetter {
// run after context is initialized.
void StopNetLogHelper();
+ base::Thread* network_thread_;
+ scoped_ptr<base::Thread> file_thread_;
+
scoped_refptr<URLRequestContextAdapterDelegate> delegate_;
scoped_ptr<net::URLRequestContext> context_;
std::string user_agent_;
bool load_disable_cache_;
- base::Thread* network_thread_;
scoped_ptr<NetLogObserver> net_log_observer_;
scoped_ptr<net::WriteToFileNetLogObserver> write_to_file_observer_;
scoped_ptr<net::ProxyConfigService> proxy_config_service_;
+ // |sdch_owner_| should be destroyed before |json_pref_store_|, because
+ // tearing down |sdch_owner_| forces |json_pref_store_| to flush pending
+ // writes to the disk.
+ scoped_refptr<JsonPrefStore> json_pref_store_;
scoped_ptr<net::SdchOwner> sdch_owner_;
scoped_ptr<URLRequestContextConfig> config_;

Powered by Google App Engine
This is Rietveld 408576698