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.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 GetFakeUserManager()->UserLoggedIn( | 847 GetFakeUserManager()->UserLoggedIn( |
848 email_string, | 848 email_string, |
849 email_string + kUserIdHashSuffix, | 849 email_string + kUserIdHashSuffix, |
850 false); | 850 false); |
851 | 851 |
852 std::string profile_name = | 852 std::string profile_name = |
853 chrome::kProfileDirPrefix + email_string + kUserIdHashSuffix; | 853 chrome::kProfileDirPrefix + email_string + kUserIdHashSuffix; |
854 TestingProfile* profile = profile_manager()->CreateTestingProfile( | 854 TestingProfile* profile = profile_manager()->CreateTestingProfile( |
855 profile_name, | 855 profile_name, |
856 scoped_ptr<PrefServiceSyncable>(), | 856 scoped_ptr<PrefServiceSyncable>(), |
857 ASCIIToUTF16(email_string), 0, std::string()); | 857 ASCIIToUTF16(email_string), 0, std::string(), |
| 858 TestingProfile::TestingFactories()); |
858 profile->set_profile_name(email_string); | 859 profile->set_profile_name(email_string); |
859 EXPECT_TRUE(profile); | 860 EXPECT_TRUE(profile); |
860 // Remember the profile name so that we can destroy it upon destruction. | 861 // Remember the profile name so that we can destroy it upon destruction. |
861 created_profiles_[profile] = profile_name; | 862 created_profiles_[profile] = profile_name; |
862 return profile; | 863 return profile; |
863 } | 864 } |
864 | 865 |
865 // Switch to another user. | 866 // Switch to another user. |
866 void SwitchActiveUser(const std::string& name) { | 867 void SwitchActiveUser(const std::string& name) { |
867 session_delegate()->SwitchActiveUser(name); | 868 session_delegate()->SwitchActiveUser(name); |
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2613 | 2614 |
2614 EXPECT_EQ(1, app_icon_loader->fetch_count()); | 2615 EXPECT_EQ(1, app_icon_loader->fetch_count()); |
2615 ASSERT_EQ(initial_size + 1, model_->items().size()); | 2616 ASSERT_EQ(initial_size + 1, model_->items().size()); |
2616 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); | 2617 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); |
2617 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); | 2618 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); |
2618 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); | 2619 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); |
2619 | 2620 |
2620 launcher_controller_->UnpinAppWithID("1"); | 2621 launcher_controller_->UnpinAppWithID("1"); |
2621 ASSERT_EQ(initial_size, model_->items().size()); | 2622 ASSERT_EQ(initial_size, model_->items().size()); |
2622 } | 2623 } |
OLD | NEW |