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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1708583003: Pass data saver pref value into embedded worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits Created 4 years, 9 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/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index c90d3e6f6375abb9c643455e26baffd89163c537..5a3ec57f708ae24b250502f8bafbd3ab4296fed9 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1725,6 +1725,15 @@ const gfx::ImageSkia* ChromeContentBrowserClient::GetDefaultFavicon() {
return rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON).ToImageSkia();
}
+bool ChromeContentBrowserClient::IsDataSaverEnabled(
+ content::BrowserContext* browser_context) {
+ Profile* profile = Profile::FromBrowserContext(browser_context);
+ if (!profile)
+ return false;
+ PrefService* prefs = profile->GetPrefs();
+ return prefs && prefs->GetBoolean(prefs::kDataSaverEnabled);
+}
+
bool ChromeContentBrowserClient::AllowAppCache(
const GURL& manifest_url,
const GURL& first_party,
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/chrome_content_browser_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698