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

Unified Diff: components/cronet/android/cronet_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: Address 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
« no previous file with comments | « components/cronet.gypi ('k') | components/cronet/android/cronet_url_request_context_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/cronet_url_request_context_adapter.h
diff --git a/components/cronet/android/cronet_url_request_context_adapter.h b/components/cronet/android/cronet_url_request_context_adapter.h
index 6366c5d03d3df77c4291e2f153bb8e3261368186..5b6cccda8945da28cb11305a6c2b0d3d51950290 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.h
+++ b/components/cronet/android/cronet_url_request_context_adapter.h
@@ -15,6 +15,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"
namespace base {
@@ -91,13 +92,25 @@ class CronetURLRequestContextAdapter {
void StopNetLogOnNetworkThread();
+ // Gets the file thread. Create one if there is none.
+ base::Thread* GetFileThread();
+
// Network thread is owned by |this|, but is destroyed from java thread.
base::Thread* network_thread_;
+
+ // File thread should be destroyed last.
+ scoped_ptr<base::Thread> file_thread_;
+
// |write_to_file_observer_| and |context_| should only be accessed on
// network thread.
scoped_ptr<net::WriteToFileNetLogObserver> write_to_file_observer_;
scoped_ptr<net::URLRequestContext> context_;
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_;
// Context config is only valid untng context is initialized.
« no previous file with comments | « components/cronet.gypi ('k') | components/cronet/android/cronet_url_request_context_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698