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

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

Issue 1401813002: Cache User Agent string in BlinkPlatformImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved to FrameLoaderClientImpl Created 5 years, 2 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: 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 4a6c43417c0624b63a46876258a7f5c6227dedba..e85967fb4d1be223e0c43c880f67fab34b6472ae 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -686,7 +686,9 @@ String FrameLoaderClientImpl::userAgent()
if (!override.isEmpty())
return override;
- return Platform::current()->userAgent();
+ if (m_userAgent.isNull())
+ m_userAgent = Platform::current()->userAgent();
kinuko 2015/10/16 11:12:21 Maybe add a comment in Platform.h to note that the
tzik 2015/10/19 08:16:48 Done.
+ return m_userAgent;
}
String FrameLoaderClientImpl::doNotTrackValue()

Powered by Google App Engine
This is Rietveld 408576698