OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/app_list/app_list_controller_delegate.h" | 5 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "chrome/browser/extensions/extension_util.h" | 9 #include "chrome/browser/extensions/extension_util.h" |
10 #include "chrome/browser/extensions/install_tracker_factory.h" | 10 #include "chrome/browser/extensions/install_tracker_factory.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 const extensions::Extension* extension = GetExtension(profile, app_id); | 81 const extensions::Extension* extension = GetExtension(profile, app_id); |
82 const extensions::ManagementPolicy* policy = | 82 const extensions::ManagementPolicy* policy = |
83 extensions::ExtensionSystem::Get(profile)->management_policy(); | 83 extensions::ExtensionSystem::Get(profile)->management_policy(); |
84 return extension && | 84 return extension && |
85 policy->UserMayModifySettings(extension, NULL); | 85 policy->UserMayModifySettings(extension, NULL); |
86 } | 86 } |
87 | 87 |
88 bool AppListControllerDelegate::CanDoShowAppInfoFlow() { | 88 bool AppListControllerDelegate::CanDoShowAppInfoFlow() { |
89 #if defined(OS_MACOSX) | 89 #if defined(OS_MACOSX) |
90 // Cocoa app list doesn't yet support the app info dialog. | 90 // Cocoa app list doesn't yet support the app info dialog. |
91 if (!app_list::switches::IsMacViewsAppListEnabled()) | 91 return false; |
92 return false; | |
93 #endif | 92 #endif |
94 return CanShowAppInfoDialog(); | 93 return CanShowAppInfoDialog(); |
95 } | 94 } |
96 | 95 |
97 void AppListControllerDelegate::DoShowAppInfoFlow( | 96 void AppListControllerDelegate::DoShowAppInfoFlow( |
98 Profile* profile, | 97 Profile* profile, |
99 const std::string& extension_id) { | 98 const std::string& extension_id) { |
100 DCHECK(CanDoShowAppInfoFlow()); | 99 DCHECK(CanDoShowAppInfoFlow()); |
101 const extensions::Extension* extension = GetExtension(profile, extension_id); | 100 const extensions::Extension* extension = GetExtension(profile, extension_id); |
102 DCHECK(extension); | 101 DCHECK(extension); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 out_apps->InsertAll(registry->enabled_extensions()); | 209 out_apps->InsertAll(registry->enabled_extensions()); |
211 out_apps->InsertAll(registry->disabled_extensions()); | 210 out_apps->InsertAll(registry->disabled_extensions()); |
212 out_apps->InsertAll(registry->terminated_extensions()); | 211 out_apps->InsertAll(registry->terminated_extensions()); |
213 } | 212 } |
214 | 213 |
215 void AppListControllerDelegate::OnSearchStarted() { | 214 void AppListControllerDelegate::OnSearchStarted() { |
216 #if defined(ENABLE_RLZ) | 215 #if defined(ENABLE_RLZ) |
217 rlz::RLZTracker::RecordAppListSearch(); | 216 rlz::RLZTracker::RecordAppListSearch(); |
218 #endif | 217 #endif |
219 } | 218 } |
OLD | NEW |