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

Side by Side Diff: ios/chrome/browser/ssl/captive_portal_detector_tab_helper.h

Issue 2853443002: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_ 5 #ifndef IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_
6 #define IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_ 6 #define IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_
7 7
8 #import "ios/web/public/web_state/web_state_user_data.h" 8 #import "ios/web/public/web_state/web_state_user_data.h"
9 9
10 namespace captive_portal { 10 namespace captive_portal {
11 class CaptivePortalDetector; 11 class CaptivePortalDetector;
12 } 12 }
13 13
14 namespace web { 14 namespace web {
15 class WebState; 15 class WebState;
16 } 16 }
17 17
18 // Associates a Tab to a CaptivePortalDetector and manages its lifetime. 18 // Associates a Tab to a CaptivePortalDetector and manages its lifetime.
19 class CaptivePortalDetectorTabHelper 19 class CaptivePortalDetectorTabHelper
20 : public web::WebStateUserData<CaptivePortalDetectorTabHelper> { 20 : public web::WebStateUserData<CaptivePortalDetectorTabHelper> {
21 public: 21 public:
22 ~CaptivePortalDetectorTabHelper() override;
23
22 explicit CaptivePortalDetectorTabHelper(web::WebState* web_state); 24 explicit CaptivePortalDetectorTabHelper(web::WebState* web_state);
23 25
24 captive_portal::CaptivePortalDetector* detector(); 26 captive_portal::CaptivePortalDetector* detector();
25 27
26 private: 28 private:
27 ~CaptivePortalDetectorTabHelper() override;
28
29 // The underlying CaptivePortalDetector. 29 // The underlying CaptivePortalDetector.
30 std::unique_ptr<captive_portal::CaptivePortalDetector> detector_; 30 std::unique_ptr<captive_portal::CaptivePortalDetector> detector_;
31 31
32 DISALLOW_COPY_AND_ASSIGN(CaptivePortalDetectorTabHelper); 32 DISALLOW_COPY_AND_ASSIGN(CaptivePortalDetectorTabHelper);
33 }; 33 };
34 34
35 #endif // IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_ 35 #endif // IOS_CHROME_BROWSER_SSL_CAPTIVE_PORTAL_DETECTOR_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698