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

Side by Side Diff: ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm

Issue 2808873002: [ObjC ARC] Converts ios/chrome/browser/ui/toolbar:toolbar to ARC. (Closed)
Patch Set: feedback Created 3 years, 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h" 5 #import "ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/omnibox/browser/autocomplete_classifier.h" 8 #include "components/omnibox/browser/autocomplete_classifier.h"
9 #include "components/omnibox/browser/autocomplete_input.h" 9 #include "components/omnibox/browser/autocomplete_input.h"
10 #include "components/omnibox/browser/autocomplete_match.h" 10 #include "components/omnibox/browser/autocomplete_match.h"
11 #include "components/prefs/pref_service.h" 11 #include "components/prefs/pref_service.h"
12 #include "ios/chrome/browser/autocomplete/autocomplete_scheme_classifier_impl.h" 12 #include "ios/chrome/browser/autocomplete/autocomplete_scheme_classifier_impl.h"
13 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 13 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
14 #include "ios/chrome/browser/chrome_url_constants.h" 14 #include "ios/chrome/browser/chrome_url_constants.h"
15 #include "ios/chrome/browser/pref_names.h" 15 #include "ios/chrome/browser/pref_names.h"
16 #include "ios/chrome/browser/ssl/ios_security_state_tab_helper.h" 16 #include "ios/chrome/browser/ssl/ios_security_state_tab_helper.h"
17 #include "ios/shared/chrome/browser/tabs/web_state_list.h" 17 #include "ios/shared/chrome/browser/tabs/web_state_list.h"
18 #import "ios/web/public/navigation_item.h" 18 #import "ios/web/public/navigation_item.h"
19 #import "ios/web/public/navigation_manager.h" 19 #import "ios/web/public/navigation_manager.h"
20 #import "ios/web/public/ssl_status.h" 20 #import "ios/web/public/ssl_status.h"
21 #import "ios/web/public/web_state/web_state.h" 21 #import "ios/web/public/web_state/web_state.h"
22 22
23 #if !defined(__has_feature) || !__has_feature(objc_arc)
24 #error "This file requires ARC support."
25 #endif
26
23 ToolbarModelDelegateIOS::ToolbarModelDelegateIOS(WebStateList* web_state_list) 27 ToolbarModelDelegateIOS::ToolbarModelDelegateIOS(WebStateList* web_state_list)
24 : web_state_list_(web_state_list) {} 28 : web_state_list_(web_state_list) {}
25 29
26 ToolbarModelDelegateIOS::~ToolbarModelDelegateIOS() {} 30 ToolbarModelDelegateIOS::~ToolbarModelDelegateIOS() {}
27 31
28 web::WebState* ToolbarModelDelegateIOS::GetActiveWebState() const { 32 web::WebState* ToolbarModelDelegateIOS::GetActiveWebState() const {
29 return web_state_list_->GetActiveWebState(); 33 return web_state_list_->GetActiveWebState();
30 } 34 }
31 35
32 web::NavigationItem* ToolbarModelDelegateIOS::GetNavigationItem() const { 36 web::NavigationItem* ToolbarModelDelegateIOS::GetNavigationItem() const {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 auto* client = IOSSecurityStateTabHelper::FromWebState(web_state); 102 auto* client = IOSSecurityStateTabHelper::FromWebState(web_state);
99 security_state::SecurityInfo result; 103 security_state::SecurityInfo result;
100 client->GetSecurityInfo(&result); 104 client->GetSecurityInfo(&result);
101 return result.malicious_content_status != 105 return result.malicious_content_status !=
102 security_state::MALICIOUS_CONTENT_STATUS_NONE; 106 security_state::MALICIOUS_CONTENT_STATUS_NONE;
103 } 107 }
104 108
105 const gfx::VectorIcon* ToolbarModelDelegateIOS::GetVectorIconOverride() const { 109 const gfx::VectorIcon* ToolbarModelDelegateIOS::GetVectorIconOverride() const {
106 return nullptr; 110 return nullptr;
107 } 111 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698