| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/chromeos/first_run/goodies_displayer.h" | 5 #include "chrome/browser/chromeos/first_run/goodies_displayer.h" |
| 6 | 6 |
| 7 #include "base/location.h" |
| 8 #include "base/single_thread_task_runner.h" |
| 9 #include "base/threading/thread_task_runner_handle.h" |
| 7 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/chromeos/login/startup_utils.h" | 11 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 9 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 12 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_list.h" | 15 #include "chrome/browser/ui/browser_list.h" |
| 13 #include "chrome/browser/ui/browser_tabstrip.h" | 16 #include "chrome/browser/ui/browser_tabstrip.h" |
| 14 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 15 #include "components/prefs/pref_service.h" | 18 #include "components/prefs/pref_service.h" |
| 16 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 if (!g_browser_process->platform_part() | 119 if (!g_browser_process->platform_part() |
| 117 ->browser_policy_connector_chromeos() | 120 ->browser_policy_connector_chromeos() |
| 118 ->IsEnterpriseManaged()) | 121 ->IsEnterpriseManaged()) |
| 119 chrome::AddTabAt(browser, GURL(kGoodiesURL), 2, false); | 122 chrome::AddTabAt(browser, GURL(kGoodiesURL), 2, false); |
| 120 | 123 |
| 121 // Set to |false| whether enterprise enrolled or Goodies shown. | 124 // Set to |false| whether enterprise enrolled or Goodies shown. |
| 122 local_state->SetBoolean(prefs::kCanShowOobeGoodiesPage, false); | 125 local_state->SetBoolean(prefs::kCanShowOobeGoodiesPage, false); |
| 123 } | 126 } |
| 124 | 127 |
| 125 // Regardless of how we got here, we don't henceforth need to show Goodies. | 128 // Regardless of how we got here, we don't henceforth need to show Goodies. |
| 126 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&Delete)); | 129 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, base::Bind(&Delete)); |
| 127 } | 130 } |
| 128 | 131 |
| 129 GoodiesDisplayerTestInfo::GoodiesDisplayerTestInfo() | 132 GoodiesDisplayerTestInfo::GoodiesDisplayerTestInfo() |
| 130 : days_since_oobe(0), setup_complete(false) {} | 133 : days_since_oobe(0), setup_complete(false) {} |
| 131 | 134 |
| 132 GoodiesDisplayerTestInfo::~GoodiesDisplayerTestInfo() {} | 135 GoodiesDisplayerTestInfo::~GoodiesDisplayerTestInfo() {} |
| 133 | 136 |
| 134 } // namespace first_run | 137 } // namespace first_run |
| 135 } // namespace chromeos | 138 } // namespace chromeos |
| OLD | NEW |