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

Side by Side Diff: ash/test/ash_test_base.h

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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
« no previous file with comments | « ash/system/win/audio/tray_audio_win.cc ('k') | ash/test/ash_test_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef ASH_TEST_ASH_TEST_BASE_H_ 5 #ifndef ASH_TEST_ASH_TEST_BASE_H_
6 #define ASH_TEST_ASH_TEST_BASE_H_ 6 #define ASH_TEST_ASH_TEST_BASE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 12
12 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
15 #include "base/threading/thread.h" 16 #include "base/threading/thread.h"
16 #include "content/public/test/test_browser_thread_bundle.h" 17 #include "content/public/test/test_browser_thread_bundle.h"
17 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
18 #include "third_party/skia/include/core/SkColor.h" 19 #include "third_party/skia/include/core/SkColor.h"
19 #include "ui/gfx/display.h" 20 #include "ui/gfx/display.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 void BlockUserSession(UserSessionBlockReason block_reason); 142 void BlockUserSession(UserSessionBlockReason block_reason);
142 void UnblockUserSession(); 143 void UnblockUserSession();
143 144
144 void DisableIME(); 145 void DisableIME();
145 146
146 private: 147 private:
147 bool setup_called_; 148 bool setup_called_;
148 bool teardown_called_; 149 bool teardown_called_;
149 // |SetUp()| doesn't activate session if this is set to false. 150 // |SetUp()| doesn't activate session if this is set to false.
150 bool start_session_; 151 bool start_session_;
151 scoped_ptr<content::TestBrowserThreadBundle> thread_bundle_; 152 std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_;
152 scoped_ptr<AshTestHelper> ash_test_helper_; 153 std::unique_ptr<AshTestHelper> ash_test_helper_;
153 scoped_ptr<ui::test::EventGenerator> event_generator_; 154 std::unique_ptr<ui::test::EventGenerator> event_generator_;
154 #if defined(OS_WIN) 155 #if defined(OS_WIN)
155 ui::ScopedOleInitializer ole_initializer_; 156 ui::ScopedOleInitializer ole_initializer_;
156 #endif 157 #endif
157 158
158 DISALLOW_COPY_AND_ASSIGN(AshTestBase); 159 DISALLOW_COPY_AND_ASSIGN(AshTestBase);
159 }; 160 };
160 161
161 class NoSessionAshTestBase : public AshTestBase { 162 class NoSessionAshTestBase : public AshTestBase {
162 public: 163 public:
163 NoSessionAshTestBase() { 164 NoSessionAshTestBase() {
164 set_start_session(false); 165 set_start_session(false);
165 } 166 }
166 ~NoSessionAshTestBase() override {} 167 ~NoSessionAshTestBase() override {}
167 168
168 private: 169 private:
169 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); 170 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase);
170 }; 171 };
171 172
172 } // namespace test 173 } // namespace test
173 } // namespace ash 174 } // namespace ash
174 175
175 #endif // ASH_TEST_ASH_TEST_BASE_H_ 176 #endif // ASH_TEST_ASH_TEST_BASE_H_
OLDNEW
« no previous file with comments | « ash/system/win/audio/tray_audio_win.cc ('k') | ash/test/ash_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698