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

Side by Side Diff: chrome/browser/ui/autofill/card_unmask_prompt_view_browsertest.cc

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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/guid.h" 6 #include "base/guid.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 content::WebContents* contents() { return contents_; } 98 content::WebContents* contents() { return contents_; }
99 TestCardUnmaskPromptController* controller() { return controller_.get(); } 99 TestCardUnmaskPromptController* controller() { return controller_.get(); }
100 TestCardUnmaskDelegate* delegate() { return delegate_.get(); } 100 TestCardUnmaskDelegate* delegate() { return delegate_.get(); }
101 101
102 protected: 102 protected:
103 // This member must outlive the controller. 103 // This member must outlive the controller.
104 scoped_refptr<content::MessageLoopRunner> runner_; 104 scoped_refptr<content::MessageLoopRunner> runner_;
105 105
106 private: 106 private:
107 content::WebContents* contents_; 107 content::WebContents* contents_;
108 scoped_ptr<TestCardUnmaskPromptController> controller_; 108 std::unique_ptr<TestCardUnmaskPromptController> controller_;
109 scoped_ptr<TestCardUnmaskDelegate> delegate_; 109 std::unique_ptr<TestCardUnmaskDelegate> delegate_;
110 110
111 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViewBrowserTest); 111 DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptViewBrowserTest);
112 }; 112 };
113 113
114 IN_PROC_BROWSER_TEST_F(CardUnmaskPromptViewBrowserTest, DisplayUI) { 114 IN_PROC_BROWSER_TEST_F(CardUnmaskPromptViewBrowserTest, DisplayUI) {
115 controller()->ShowPrompt(CreateCardUnmaskPromptView(controller(), contents()), 115 controller()->ShowPrompt(CreateCardUnmaskPromptView(controller(), contents()),
116 test::GetMaskedServerCard(), 116 test::GetMaskedServerCard(),
117 delegate()->GetWeakPtr()); 117 delegate()->GetWeakPtr());
118 } 118 }
119 119
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // before CardUnmaskPromptViewBridge::OnConstrainedWindowClosed() is called. 154 // before CardUnmaskPromptViewBridge::OnConstrainedWindowClosed() is called.
155 FreeDelegate(); 155 FreeDelegate();
156 browser()->tab_strip_model()->GetActiveWebContents()->Close(); 156 browser()->tab_strip_model()->GetActiveWebContents()->Close();
157 157
158 content::RunAllPendingInMessageLoop(); 158 content::RunAllPendingInMessageLoop();
159 } 159 }
160 160
161 } // namespace 161 } // namespace
162 162
163 } // namespace autofill 163 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698