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

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

Issue 2692603002: Convert //ios/web_view/internal to ARC. (Closed)
Patch Set: Respond to comments. Created 3 years, 10 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
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/criwv_web_client.h" 5 #import "ios/web_view/internal/criwv_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/criwv_browser_state.h" 9 #include "ios/web_view/internal/criwv_browser_state.h"
10 #import "ios/web_view/internal/criwv_web_main_parts.h" 10 #import "ios/web_view/internal/criwv_web_main_parts.h"
11 #import "ios/web_view/public/criwv_delegate.h" 11 #import "ios/web_view/public/criwv_delegate.h"
12 12
13 #if !defined(__has_feature) || !__has_feature(objc_arc)
14 #error "This file requires ARC support."
15 #endif
16
13 namespace ios_web_view { 17 namespace ios_web_view {
14 18
15 CRIWVWebClient::CRIWVWebClient(id<CRIWVDelegate> delegate) 19 CRIWVWebClient::CRIWVWebClient(id<CRIWVDelegate> delegate)
16 : delegate_(delegate), web_main_parts_(nullptr) {} 20 : delegate_(delegate), web_main_parts_(nullptr) {}
17 21
18 CRIWVWebClient::~CRIWVWebClient() {} 22 CRIWVWebClient::~CRIWVWebClient() {}
19 23
20 web::WebMainParts* CRIWVWebClient::CreateWebMainParts() { 24 web::WebMainParts* CRIWVWebClient::CreateWebMainParts() {
21 web_main_parts_ = new CRIWVWebMainParts(delegate_); 25 web_main_parts_ = new CRIWVWebMainParts(delegate_);
22 return web_main_parts_; 26 return web_main_parts_;
(...skipping 10 matching lines...) Expand all
33 std::string CRIWVWebClient::GetProduct() const { 37 std::string CRIWVWebClient::GetProduct() const {
34 return base::SysNSStringToUTF8([delegate_ partialUserAgent]); 38 return base::SysNSStringToUTF8([delegate_ partialUserAgent]);
35 } 39 }
36 40
37 std::string CRIWVWebClient::GetUserAgent(bool desktop_user_agent) const { 41 std::string CRIWVWebClient::GetUserAgent(bool desktop_user_agent) const {
38 std::string product = GetProduct(); 42 std::string product = GetProduct();
39 return web::BuildUserAgentFromProduct(product); 43 return web::BuildUserAgentFromProduct(product);
40 } 44 }
41 45
42 } // namespace ios_web_view 46 } // namespace ios_web_view
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698