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 "apps/app_launcher.h" | 5 #include "apps/app_launcher.h" |
6 | 6 |
7 #include "apps/pref_names.h" | 7 #include "apps/pref_names.h" |
| 8 #include "apps/switches.h" |
8 #include "base/command_line.h" | 9 #include "base/command_line.h" |
9 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
10 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
11 #include "base/threading/sequenced_worker_pool.h" | 12 #include "base/threading/sequenced_worker_pool.h" |
12 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/ui/host_desktop.h" | 14 #include "chrome/browser/ui/host_desktop.h" |
14 #include "chrome/common/chrome_switches.h" | |
15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
16 | 16 |
17 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
18 #include "chrome/installer/launcher_support/chrome_launcher_support.h" | 18 #include "chrome/installer/launcher_support/chrome_launcher_support.h" |
19 #include "chrome/installer/util/browser_distribution.h" | 19 #include "chrome/installer/util/browser_distribution.h" |
20 #endif | 20 #endif |
21 | 21 |
22 namespace apps { | 22 namespace apps { |
23 | 23 |
24 namespace { | 24 namespace { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 bool WasAppLauncherEnabled() { | 105 bool WasAppLauncherEnabled() { |
106 PrefService* prefs = g_browser_process->local_state(); | 106 PrefService* prefs = g_browser_process->local_state(); |
107 // In some tests, the prefs aren't initialised. | 107 // In some tests, the prefs aren't initialised. |
108 if (!prefs) | 108 if (!prefs) |
109 return SynchronousAppLauncherChecks() == APP_LAUNCHER_ENABLED; | 109 return SynchronousAppLauncherChecks() == APP_LAUNCHER_ENABLED; |
110 return prefs->GetBoolean(prefs::kAppLauncherIsEnabled); | 110 return prefs->GetBoolean(prefs::kAppLauncherIsEnabled); |
111 } | 111 } |
112 | 112 |
113 } // namespace apps | 113 } // namespace apps |
OLD | NEW |