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

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 f57bc395a0eb16e6b0e6966ac96c5461a152ea8d..bc8ac3c3f6f53bda27606568105d044aa667049e 100644
--- a/chrome/browser/io_thread.h
+++ b/chrome/browser/io_thread.h
@@ -39,6 +39,7 @@ class CommandLine;
#if defined(OS_ANDROID)
namespace chrome {
namespace android {
+class DataUseTabModel;
class ExternalDataUseObserver;
}
}
@@ -270,6 +271,9 @@ class IOThread : public content::BrowserThreadDelegate {
chrome::android::ExternalDataUseObserver* external_data_use_observer() const {
mmenke 2015/11/17 22:48:40 nit: Both of these methods should be indented 2.
tbansal1 2015/11/18 01:32:24 Done.
return external_data_use_observer_.get();
}
mmenke 2015/11/17 22:48:40 nit: Blank line between methods
tbansal1 2015/11/18 01:32:24 Done.
+base::WeakPtr<chrome::android::DataUseTabModel> data_use_tab_model() const {
mmenke 2015/11/17 22:48:40 Hrm...actually, do we even need a weak pointer her
tbansal1 2015/11/18 01:32:24 But there could be a function on DataUseTabModel p
+ return data_use_tab_model_;
+}
#endif // defined(OS_ANDROID)
private:
@@ -539,6 +543,8 @@ chrome::android::ExternalDataUseObserver* external_data_use_observer() const {
#if defined(OS_ANDROID)
scoped_ptr<chrome::android::ExternalDataUseObserver>
external_data_use_observer_;
+ // WeakPtr to DataUseTabModel to be used on IO thread.
+ base::WeakPtr<chrome::android::DataUseTabModel> data_use_tab_model_;
#endif // defined(OS_ANDROID)
const base::TimeTicks creation_time_;

Powered by Google App Engine
This is Rietveld 408576698