| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 101 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
| 102 #include "components/policy/core/common/cloud/policy_builder.h" | 102 #include "components/policy/core/common/cloud/policy_builder.h" |
| 103 #include "components/policy/core/common/external_data_fetcher.h" | 103 #include "components/policy/core/common/external_data_fetcher.h" |
| 104 #include "components/policy/core/common/policy_map.h" | 104 #include "components/policy/core/common/policy_map.h" |
| 105 #include "components/policy/core/common/policy_namespace.h" | 105 #include "components/policy/core/common/policy_namespace.h" |
| 106 #include "components/policy/core/common/policy_service.h" | 106 #include "components/policy/core/common/policy_service.h" |
| 107 #include "components/policy/core/common/policy_switches.h" | 107 #include "components/policy/core/common/policy_switches.h" |
| 108 #include "components/policy/policy_constants.h" | 108 #include "components/policy/policy_constants.h" |
| 109 #include "components/prefs/pref_change_registrar.h" | 109 #include "components/prefs/pref_change_registrar.h" |
| 110 #include "components/prefs/pref_service.h" | 110 #include "components/prefs/pref_service.h" |
| 111 #include "components/session_manager/core/session_manager.h" |
| 111 #include "components/signin/core/browser/signin_manager.h" | 112 #include "components/signin/core/browser/signin_manager.h" |
| 112 #include "components/user_manager/user.h" | 113 #include "components/user_manager/user.h" |
| 113 #include "components/user_manager/user_manager.h" | 114 #include "components/user_manager/user_manager.h" |
| 114 #include "components/user_manager/user_type.h" | 115 #include "components/user_manager/user_type.h" |
| 115 #include "content/public/browser/browser_thread.h" | 116 #include "content/public/browser/browser_thread.h" |
| 116 #include "content/public/browser/notification_details.h" | 117 #include "content/public/browser/notification_details.h" |
| 117 #include "content/public/browser/notification_service.h" | 118 #include "content/public/browser/notification_service.h" |
| 118 #include "content/public/browser/notification_source.h" | 119 #include "content/public/browser/notification_source.h" |
| 119 #include "content/public/browser/web_contents.h" | 120 #include "content/public/browser/web_contents.h" |
| 120 #include "content/public/browser/web_ui.h" | 121 #include "content/public/browser/web_ui.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 net::URLFetcherDelegate* delegate, | 393 net::URLFetcherDelegate* delegate, |
| 393 const std::string& response_data, | 394 const std::string& response_data, |
| 394 net::HttpStatusCode response_code, | 395 net::HttpStatusCode response_code, |
| 395 net::URLRequestStatus::Status status) { | 396 net::URLRequestStatus::Status status) { |
| 396 task_runner->PostTask(FROM_HERE, callback); | 397 task_runner->PostTask(FROM_HERE, callback); |
| 397 return base::MakeUnique<net::FakeURLFetcher>(url, delegate, response_data, | 398 return base::MakeUnique<net::FakeURLFetcher>(url, delegate, response_data, |
| 398 response_code, status); | 399 response_code, status); |
| 399 } | 400 } |
| 400 | 401 |
| 401 bool IsSessionStarted() { | 402 bool IsSessionStarted() { |
| 402 return user_manager::UserManager::Get()->IsSessionStarted(); | 403 return session_manager::SessionManager::Get()->IsSessionStarted(); |
| 403 } | 404 } |
| 404 | 405 |
| 405 void PolicyChangedCallback(const base::Closure& callback, | 406 void PolicyChangedCallback(const base::Closure& callback, |
| 406 const base::Value* old_value, | 407 const base::Value* old_value, |
| 407 const base::Value* new_value) { | 408 const base::Value* new_value) { |
| 408 callback.Run(); | 409 callback.Run(); |
| 409 } | 410 } |
| 410 | 411 |
| 411 } // namespace | 412 } // namespace |
| 412 | 413 |
| (...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2444 ASSERT_TRUE(content::ExecuteScript(contents_, | 2445 ASSERT_TRUE(content::ExecuteScript(contents_, |
| 2445 "$('tos-accept-button').click();")); | 2446 "$('tos-accept-button').click();")); |
| 2446 | 2447 |
| 2447 WaitForSessionStart(); | 2448 WaitForSessionStart(); |
| 2448 } | 2449 } |
| 2449 | 2450 |
| 2450 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, | 2451 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, |
| 2451 TermsOfServiceDownloadTest, testing::Bool()); | 2452 TermsOfServiceDownloadTest, testing::Bool()); |
| 2452 | 2453 |
| 2453 } // namespace policy | 2454 } // namespace policy |
| OLD | NEW |