OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/net/nss_context.h" | 5 #include "chrome/browser/net/nss_context.h" |
6 | 6 |
| 7 #include <memory> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
9 #include "chrome/browser/chromeos/login/login_manager_test.h" | 11 #include "chrome/browser/chromeos/login/login_manager_test.h" |
10 #include "chrome/browser/chromeos/login/startup_utils.h" | 12 #include "chrome/browser/chromeos/login/startup_utils.h" |
11 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" | 13 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" |
12 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 14 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
13 #include "components/user_manager/user.h" | 15 #include "components/user_manager/user.h" |
14 #include "components/user_manager/user_manager.h" | 16 #include "components/user_manager/user_manager.h" |
15 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
16 #include "net/cert/nss_cert_database.h" | 18 #include "net/cert/nss_cert_database.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 run_loop_->Quit(); | 142 run_loop_->Quit(); |
141 } | 143 } |
142 | 144 |
143 void OnUserAddingStarted() override { | 145 void OnUserAddingStarted() override { |
144 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 146 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
145 finished_ = false; | 147 finished_ = false; |
146 } | 148 } |
147 | 149 |
148 private: | 150 private: |
149 bool finished_ = false; | 151 bool finished_ = false; |
150 scoped_ptr<base::RunLoop> run_loop_; | 152 std::unique_ptr<base::RunLoop> run_loop_; |
151 DISALLOW_COPY_AND_ASSIGN(UserAddingFinishObserver); | 153 DISALLOW_COPY_AND_ASSIGN(UserAddingFinishObserver); |
152 }; | 154 }; |
153 | 155 |
154 } // namespace | 156 } // namespace |
155 | 157 |
156 class NSSContextChromeOSBrowserTest : public chromeos::LoginManagerTest { | 158 class NSSContextChromeOSBrowserTest : public chromeos::LoginManagerTest { |
157 public: | 159 public: |
158 NSSContextChromeOSBrowserTest() | 160 NSSContextChromeOSBrowserTest() |
159 : LoginManagerTest(true /* should_launch_browser */) {} | 161 : LoginManagerTest(true /* should_launch_browser */) {} |
160 ~NSSContextChromeOSBrowserTest() override {} | 162 ~NSSContextChromeOSBrowserTest() override {} |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 DBTester tester2(profile2); | 195 DBTester tester2(profile2); |
194 ASSERT_TRUE(tester2.DoGetDBTests()); | 196 ASSERT_TRUE(tester2.DoGetDBTests()); |
195 | 197 |
196 // Get both DBs again to check that the same object is returned. | 198 // Get both DBs again to check that the same object is returned. |
197 tester1.DoGetDBAgainTests(); | 199 tester1.DoGetDBAgainTests(); |
198 tester2.DoGetDBAgainTests(); | 200 tester2.DoGetDBAgainTests(); |
199 | 201 |
200 // Check that each user has a separate DB and NSS slots. | 202 // Check that each user has a separate DB and NSS slots. |
201 tester1.DoNotEqualsTests(&tester2); | 203 tester1.DoNotEqualsTests(&tester2); |
202 } | 204 } |
OLD | NEW |