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

Unified Diff: chrome/browser/io_thread.h

Issue 1443683002: Notify DataUseTabModel of navigations and tab closures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sclittle comments Created 5 years, 1 month 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/io_thread.h
diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h
index 41c042fe8ac9fd2e3c84bae2927a22e1a268c699..a9f4c0d0bf403f0a9ec854b5972c2cdd282fe66f 100644
--- a/chrome/browser/io_thread.h
+++ b/chrome/browser/io_thread.h
@@ -38,6 +38,7 @@ class CommandLine;
#if defined(OS_ANDROID)
namespace chrome {
namespace android {
+class DataUseTabModel;
class ExternalDataUseObserver;
}
}
@@ -275,6 +276,12 @@ class IOThread : public content::BrowserThreadDelegate {
// a result of a field trial or a command line flag.
static bool ShouldEnableQuicForDataReductionProxy();
+#if defined(OS_ANDROID)
+ base::WeakPtr<chrome::android::DataUseTabModel> data_use_tab_model() const {
+ return data_use_tab_model_;
+ }
+#endif // defined(OS_ANDROID)
+
private:
// Map from name to value for all parameters associate with a field trial.
typedef std::map<std::string, std::string> VariationParameters;
@@ -537,6 +544,11 @@ class IOThread : public content::BrowserThreadDelegate {
const base::TimeTicks creation_time_;
+#if defined(OS_ANDROID)
+ // WeakPtr to DataUseTabModel to be used on IO thread.
sclittle 2015/11/24 23:07:37 Please be more specific - data_use_tab_model_ shou
tbansal1 2015/11/25 20:55:16 Obsolete.
+ base::WeakPtr<chrome::android::DataUseTabModel> data_use_tab_model_;
+#endif // defined(OS_ANDROID)
+
base::WeakPtrFactory<IOThread> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(IOThread);

Powered by Google App Engine
This is Rietveld 408576698