| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/chromeos/policy/device_local_account.h" | 5 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "base/callback.h" | 21 #include "base/callback.h" |
| 22 #include "base/command_line.h" | 22 #include "base/command_line.h" |
| 23 #include "base/files/file_path.h" | 23 #include "base/files/file_path.h" |
| 24 #include "base/files/file_util.h" | 24 #include "base/files/file_util.h" |
| 25 #include "base/json/json_reader.h" | 25 #include "base/json/json_reader.h" |
| 26 #include "base/json/json_writer.h" | 26 #include "base/json/json_writer.h" |
| 27 #include "base/location.h" | 27 #include "base/location.h" |
| 28 #include "base/macros.h" | 28 #include "base/macros.h" |
| 29 #include "base/memory/ptr_util.h" | 29 #include "base/memory/ptr_util.h" |
| 30 #include "base/memory/ref_counted.h" | 30 #include "base/memory/ref_counted.h" |
| 31 #include "base/message_loop/message_loop.h" | |
| 32 #include "base/path_service.h" | 31 #include "base/path_service.h" |
| 33 #include "base/run_loop.h" | 32 #include "base/run_loop.h" |
| 34 #include "base/sequenced_task_runner.h" | 33 #include "base/sequenced_task_runner.h" |
| 34 #include "base/single_thread_task_runner.h" |
| 35 #include "base/strings/string_number_conversions.h" | 35 #include "base/strings/string_number_conversions.h" |
| 36 #include "base/strings/string_util.h" | 36 #include "base/strings/string_util.h" |
| 37 #include "base/strings/stringprintf.h" | 37 #include "base/strings/stringprintf.h" |
| 38 #include "base/strings/utf_string_conversions.h" | 38 #include "base/strings/utf_string_conversions.h" |
| 39 #include "base/synchronization/lock.h" | 39 #include "base/synchronization/lock.h" |
| 40 #include "base/threading/sequenced_worker_pool.h" | 40 #include "base/threading/sequenced_worker_pool.h" |
| 41 #include "base/threading/thread_task_runner_handle.h" | 41 #include "base/threading/thread_task_runner_handle.h" |
| 42 #include "base/values.h" | 42 #include "base/values.h" |
| 43 #include "chrome/browser/browser_process.h" | 43 #include "chrome/browser/browser_process.h" |
| 44 #include "chrome/browser/chrome_notification_types.h" | 44 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 | 523 |
| 524 chromeos::test::UserSessionManagerTestApi session_manager_test_api( | 524 chromeos::test::UserSessionManagerTestApi session_manager_test_api( |
| 525 chromeos::UserSessionManager::GetInstance()); | 525 chromeos::UserSessionManager::GetInstance()); |
| 526 session_manager_test_api.SetShouldObtainTokenHandleInTests(false); | 526 session_manager_test_api.SetShouldObtainTokenHandleInTests(false); |
| 527 } | 527 } |
| 528 | 528 |
| 529 void TearDownOnMainThread() override { | 529 void TearDownOnMainThread() override { |
| 530 BrowserList::RemoveObserver(this); | 530 BrowserList::RemoveObserver(this); |
| 531 | 531 |
| 532 // This shuts down the login UI. | 532 // This shuts down the login UI. |
| 533 base::MessageLoop::current()->PostTask(FROM_HERE, | 533 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 534 base::Bind(&chrome::AttemptExit)); | 534 FROM_HERE, base::Bind(&chrome::AttemptExit)); |
| 535 base::RunLoop().RunUntilIdle(); | 535 base::RunLoop().RunUntilIdle(); |
| 536 } | 536 } |
| 537 | 537 |
| 538 void LocalStateChanged(user_manager::UserManager* user_manager) override { | 538 void LocalStateChanged(user_manager::UserManager* user_manager) override { |
| 539 if (run_loop_) | 539 if (run_loop_) |
| 540 run_loop_->Quit(); | 540 run_loop_->Quit(); |
| 541 } | 541 } |
| 542 | 542 |
| 543 void OnBrowserRemoved(Browser* browser) override { | 543 void OnBrowserRemoved(Browser* browser) override { |
| 544 if (run_loop_) | 544 if (run_loop_) |
| (...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2444 ASSERT_TRUE(content::ExecuteScript(contents_, | 2444 ASSERT_TRUE(content::ExecuteScript(contents_, |
| 2445 "$('tos-accept-button').click();")); | 2445 "$('tos-accept-button').click();")); |
| 2446 | 2446 |
| 2447 WaitForSessionStart(); | 2447 WaitForSessionStart(); |
| 2448 } | 2448 } |
| 2449 | 2449 |
| 2450 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, | 2450 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, |
| 2451 TermsOfServiceDownloadTest, testing::Bool()); | 2451 TermsOfServiceDownloadTest, testing::Bool()); |
| 2452 | 2452 |
| 2453 } // namespace policy | 2453 } // namespace policy |
| OLD | NEW |