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

Side by Side Diff: ios/web/shell/shell_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/shell/shell_web_client.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | 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/shell/shell_web_client.h" 5 #import "ios/web/shell/shell_web_client.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include "ios/web/public/user_agent.h" 9 #include "ios/web/public/user_agent.h"
10 #include "ios/web/shell/shell_web_main_parts.h" 10 #include "ios/web/shell/shell_web_main_parts.h"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 ShellBrowserState* ShellWebClient::browser_state() const { 29 ShellBrowserState* ShellWebClient::browser_state() const {
30 return web_main_parts_->browser_state(); 30 return web_main_parts_->browser_state();
31 } 31 }
32 32
33 std::string ShellWebClient::GetProduct() const { 33 std::string ShellWebClient::GetProduct() const {
34 return "CriOS/36.77.34.45"; 34 return "CriOS/36.77.34.45";
35 } 35 }
36 36
37 std::string ShellWebClient::GetUserAgent(bool desktop_user_agent) const { 37 std::string ShellWebClient::GetUserAgent(UserAgentType type) const {
38 std::string product = GetProduct(); 38 std::string product = GetProduct();
39 return web::BuildUserAgentFromProduct(product); 39 return web::BuildUserAgentFromProduct(product);
40 } 40 }
41 41
42 void ShellWebClient::AllowCertificateError( 42 void ShellWebClient::AllowCertificateError(
43 WebState*, 43 WebState*,
44 int /*cert_error*/, 44 int /*cert_error*/,
45 const net::SSLInfo&, 45 const net::SSLInfo&,
46 const GURL&, 46 const GURL&,
47 bool overridable, 47 bool overridable,
(...skipping 16 matching lines...) Expand all
64 block_callback.Run(true); 64 block_callback.Run(true);
65 }]]; 65 }]];
66 } 66 }
67 [[UIApplication sharedApplication].keyWindow.rootViewController 67 [[UIApplication sharedApplication].keyWindow.rootViewController
68 presentViewController:alert 68 presentViewController:alert
69 animated:YES 69 animated:YES
70 completion:nil]; 70 completion:nil];
71 } 71 }
72 72
73 } // namespace web 73 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/shell/shell_web_client.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698