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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
11 #include <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 #include <utility> | 13 #include <utility> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "ash/ash_switches.h" | 16 #include "ash/common/ash_switches.h" |
17 #include "ash/common/shelf/shelf_item_delegate_manager.h" | 17 #include "ash/common/shelf/shelf_item_delegate_manager.h" |
18 #include "ash/common/shelf/shelf_model.h" | 18 #include "ash/common/shelf/shelf_model.h" |
19 #include "ash/common/shelf/shelf_model_observer.h" | 19 #include "ash/common/shelf/shelf_model_observer.h" |
20 #include "ash/shell.h" | 20 #include "ash/shell.h" |
21 #include "ash/test/shelf_item_delegate_manager_test_api.h" | 21 #include "ash/test/shelf_item_delegate_manager_test_api.h" |
22 #include "ash/test/test_session_state_delegate.h" | 22 #include "ash/test/test_session_state_delegate.h" |
23 #include "ash/test/test_shell_delegate.h" | 23 #include "ash/test/test_shell_delegate.h" |
24 #include "base/command_line.h" | 24 #include "base/command_line.h" |
25 #include "base/compiler_specific.h" | 25 #include "base/compiler_specific.h" |
26 #include "base/files/file_path.h" | 26 #include "base/files/file_path.h" |
(...skipping 3044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3071 // by hash we can determine that appropriate package was set by policy. | 3071 // by hash we can determine that appropriate package was set by policy. |
3072 base::ListValue policy_value; | 3072 base::ListValue policy_value; |
3073 InsertPrefValue(&policy_value, 0, appinfo.package_name); | 3073 InsertPrefValue(&policy_value, 0, appinfo.package_name); |
3074 profile()->GetTestingPrefService()->SetManagedPref( | 3074 profile()->GetTestingPrefService()->SetManagedPref( |
3075 prefs::kPolicyPinnedLauncherApps, policy_value.DeepCopy()); | 3075 prefs::kPolicyPinnedLauncherApps, policy_value.DeepCopy()); |
3076 | 3076 |
3077 EXPECT_TRUE(launcher_controller_->IsAppPinned(app_id)); | 3077 EXPECT_TRUE(launcher_controller_->IsAppPinned(app_id)); |
3078 EXPECT_EQ(AppListControllerDelegate::PIN_FIXED, | 3078 EXPECT_EQ(AppListControllerDelegate::PIN_FIXED, |
3079 launcher_controller_->GetPinnable(app_id)); | 3079 launcher_controller_->GetPinnable(app_id)); |
3080 } | 3080 } |
OLD | NEW |