| 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 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 DCHECK(it != created_profiles_.end()); | 918 DCHECK(it != created_profiles_.end()); |
| 919 profile_manager_->DeleteTestingProfile(it->second); | 919 profile_manager_->DeleteTestingProfile(it->second); |
| 920 created_profiles_.erase(it); | 920 created_profiles_.erase(it); |
| 921 } | 921 } |
| 922 | 922 |
| 923 private: | 923 private: |
| 924 typedef std::map<Profile*, std::string> ProfileToNameMap; | 924 typedef std::map<Profile*, std::string> ProfileToNameMap; |
| 925 TestingProfileManager* profile_manager() { return profile_manager_.get(); } | 925 TestingProfileManager* profile_manager() { return profile_manager_.get(); } |
| 926 | 926 |
| 927 chromeos::FakeUserManager* GetFakeUserManager() { | 927 chromeos::FakeUserManager* GetFakeUserManager() { |
| 928 return static_cast<chromeos::FakeUserManager*>( | 928 return static_cast<chromeos::FakeUserManager*>(chromeos::GetUserManager()); |
| 929 chromeos::UserManager::Get()); | |
| 930 } | 929 } |
| 931 | 930 |
| 932 scoped_ptr<TestingProfileManager> profile_manager_; | 931 scoped_ptr<TestingProfileManager> profile_manager_; |
| 933 scoped_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_; | 932 scoped_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_; |
| 934 | 933 |
| 935 ash::test::TestShellDelegate* shell_delegate_; | 934 ash::test::TestShellDelegate* shell_delegate_; |
| 936 | 935 |
| 937 ProfileToNameMap created_profiles_; | 936 ProfileToNameMap created_profiles_; |
| 938 | 937 |
| 939 DISALLOW_COPY_AND_ASSIGN( | 938 DISALLOW_COPY_AND_ASSIGN( |
| (...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2692 | 2691 |
| 2693 EXPECT_EQ(1, app_icon_loader->fetch_count()); | 2692 EXPECT_EQ(1, app_icon_loader->fetch_count()); |
| 2694 ASSERT_EQ(initial_size + 1, model_->items().size()); | 2693 ASSERT_EQ(initial_size + 1, model_->items().size()); |
| 2695 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); | 2694 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); |
| 2696 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); | 2695 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); |
| 2697 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); | 2696 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); |
| 2698 | 2697 |
| 2699 launcher_controller_->UnpinAppWithID("1"); | 2698 launcher_controller_->UnpinAppWithID("1"); |
| 2700 ASSERT_EQ(initial_size, model_->items().size()); | 2699 ASSERT_EQ(initial_size, model_->items().size()); |
| 2701 } | 2700 } |
| OLD | NEW |