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

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/EmulatedDevices.js

Issue 2300403003: DevTools: patch browser's Chrome version into Chrome user agents for emulation (Closed)
Patch Set: renames Created 4 years, 3 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/devtools/front_end/emulation/EmulatedDevices.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/EmulatedDevices.js b/third_party/WebKit/Source/devtools/front_end/emulation/EmulatedDevices.js
index 7369d659813e05f41259b32b99b7f3dacae5fbe6..efc022dcb5bc9629756b3a0ebfe051b656fcd489 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/EmulatedDevices.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/EmulatedDevices.js
@@ -139,7 +139,8 @@ WebInspector.EmulatedDevice.fromJSONV1 = function(json)
var result = new WebInspector.EmulatedDevice();
result.title = /** @type {string} */ (parseValue(json, "title", "string"));
result.type = /** @type {string} */ (parseValue(json, "type", "string"));
- result.userAgent = /** @type {string} */ (parseValue(json, "user-agent", "string"));
+ var rawUserAgent = /** @type {string} */ (parseValue(json, "user-agent", "string"));
+ result.userAgent = WebInspector.MultitargetNetworkManager.patchUserAgentWithChromeVersion(rawUserAgent);
var capabilities = parseValue(json, "capabilities", "object", []);
if (!Array.isArray(capabilities))

Powered by Google App Engine
This is Rietveld 408576698