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

Side by Side Diff: chrome/browser/ui/views/certificate_selector.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROME_BROWSER_UI_VIEWS_CERTIFICATE_SELECTOR_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_CERTIFICATE_SELECTOR_H_
6 #define CHROME_BROWSER_UI_VIEWS_CERTIFICATE_SELECTOR_H_ 6 #define CHROME_BROWSER_UI_VIEWS_CERTIFICATE_SELECTOR_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
11 #include "net/cert/x509_certificate.h" 12 #include "net/cert/x509_certificate.h"
12 #include "ui/views/controls/button/button.h" 13 #include "ui/views/controls/button/button.h"
13 #include "ui/views/controls/table/table_view_observer.h" 14 #include "ui/views/controls/table/table_view_observer.h"
14 #include "ui/views/window/dialog_delegate.h" 15 #include "ui/views/window/dialog_delegate.h"
15 16
16 namespace content { 17 namespace content {
17 class WebContents; 18 class WebContents;
18 } 19 }
19 20
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void OnDoubleClick() override; 70 void OnDoubleClick() override;
70 71
71 protected: 72 protected:
72 // The dimensions of the certificate selector table view, in pixels. 73 // The dimensions of the certificate selector table view, in pixels.
73 static const int kTableViewWidth; 74 static const int kTableViewWidth;
74 static const int kTableViewHeight; 75 static const int kTableViewHeight;
75 76
76 // Initializes the dialog. |text| is shown above the list of certificates 77 // Initializes the dialog. |text| is shown above the list of certificates
77 // and is supposed to explain to the user what the implication of the 78 // and is supposed to explain to the user what the implication of the
78 // certificate selection is. 79 // certificate selection is.
79 void InitWithText(scoped_ptr<views::View> text_label); 80 void InitWithText(std::unique_ptr<views::View> text_label);
80 81
81 private: 82 private:
82 class CertificateTableModel; 83 class CertificateTableModel;
83 84
84 net::CertificateList certificates_; 85 net::CertificateList certificates_;
85 86
86 // Whether to show the provider column in the table or not. Certificates 87 // Whether to show the provider column in the table or not. Certificates
87 // provided by the platform show the empty string as provider. That column is 88 // provided by the platform show the empty string as provider. That column is
88 // shown only if there is at least one non-empty provider, i.e. non-platform 89 // shown only if there is at least one non-empty provider, i.e. non-platform
89 // certificate. 90 // certificate.
90 bool show_provider_column_ = false; 91 bool show_provider_column_ = false;
91 scoped_ptr<CertificateTableModel> model_; 92 std::unique_ptr<CertificateTableModel> model_;
92 93
93 content::WebContents* const web_contents_; 94 content::WebContents* const web_contents_;
94 95
95 views::TableView* table_; 96 views::TableView* table_;
96 views::LabelButton* view_cert_button_; 97 views::LabelButton* view_cert_button_;
97 98
98 DISALLOW_COPY_AND_ASSIGN(CertificateSelector); 99 DISALLOW_COPY_AND_ASSIGN(CertificateSelector);
99 }; 100 };
100 101
101 } // namespace chrome 102 } // namespace chrome
102 103
103 #endif // CHROME_BROWSER_UI_VIEWS_CERTIFICATE_SELECTOR_H_ 104 #endif // CHROME_BROWSER_UI_VIEWS_CERTIFICATE_SELECTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_dialogs_views_mac.cc ('k') | chrome/browser/ui/views/certificate_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698