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

Unified Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 1839023002: Cache user agent string in FrameLoaderClientImpl instead of BlinkPlatformImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/web/FrameLoaderClientImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
index 0da00121826741a4ec3cc7479b9128cbd18437fe..3250066ef3ce13fe2795ee1d2cdae5cc62b159a2 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -748,7 +748,9 @@ String FrameLoaderClientImpl::userAgent()
if (!override.isEmpty())
return override;
- return Platform::current()->userAgent();
+ if (m_userAgent.isEmpty())
+ m_userAgent = Platform::current()->userAgent();
+ return m_userAgent;
}
String FrameLoaderClientImpl::doNotTrackValue()
« no previous file with comments | « third_party/WebKit/Source/web/FrameLoaderClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698