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

Side by Side Diff: ios/web_view/internal/web_view_web_client.mm

Issue 2705293014: Created web::UserAgentType. (Closed)
Patch Set: rebase + compile fix Created 3 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 unified diff | Download patch
« no previous file with comments | « ios/web_view/internal/web_view_web_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/web_view/internal/web_view_web_client.h" 5 #import "ios/web_view/internal/web_view_web_client.h"
6 6
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "ios/web/public/user_agent.h" 8 #include "ios/web/public/user_agent.h"
9 #include "ios/web_view/internal/web_view_browser_state.h" 9 #include "ios/web_view/internal/web_view_browser_state.h"
10 #import "ios/web_view/internal/web_view_web_main_parts.h" 10 #import "ios/web_view/internal/web_view_web_main_parts.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 WebViewBrowserState* WebViewWebClient::off_the_record_browser_state() const { 33 WebViewBrowserState* WebViewWebClient::off_the_record_browser_state() const {
34 return web_main_parts_->off_the_record_browser_state(); 34 return web_main_parts_->off_the_record_browser_state();
35 } 35 }
36 36
37 std::string WebViewWebClient::GetProduct() const { 37 std::string WebViewWebClient::GetProduct() const {
38 return base::SysNSStringToUTF8([delegate_ partialUserAgent]); 38 return base::SysNSStringToUTF8([delegate_ partialUserAgent]);
39 } 39 }
40 40
41 std::string WebViewWebClient::GetUserAgent(bool desktop_user_agent) const { 41 std::string WebViewWebClient::GetUserAgent(web::UserAgentType type) const {
42 return web::BuildUserAgentFromProduct(GetProduct()); 42 return web::BuildUserAgentFromProduct(GetProduct());
43 } 43 }
44 44
45 } // namespace ios_web_view 45 } // namespace ios_web_view
OLDNEW
« no previous file with comments | « ios/web_view/internal/web_view_web_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698