| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chromeos/note_taking_helper.h" | 5 #include "chrome/browser/chromeos/note_taking_helper.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 void InstallExtension(const extensions::Extension* extension, | 252 void InstallExtension(const extensions::Extension* extension, |
| 253 Profile* profile) { | 253 Profile* profile) { |
| 254 extensions::ExtensionSystem::Get(profile) | 254 extensions::ExtensionSystem::Get(profile) |
| 255 ->extension_service() | 255 ->extension_service() |
| 256 ->AddExtension(extension); | 256 ->AddExtension(extension); |
| 257 } | 257 } |
| 258 void UninstallExtension(const extensions::Extension* extension, | 258 void UninstallExtension(const extensions::Extension* extension, |
| 259 Profile* profile) { | 259 Profile* profile) { |
| 260 extensions::ExtensionSystem::Get(profile) | 260 extensions::ExtensionSystem::Get(profile) |
| 261 ->extension_service() | 261 ->extension_service() |
| 262 ->UnloadExtension(extension->id(), | 262 ->UnloadExtension( |
| 263 extensions::UnloadedExtensionInfo::REASON_UNINSTALL); | 263 extension->id(), |
| 264 extensions::UnloadedExtensionReason::REASON_UNINSTALL); |
| 264 } | 265 } |
| 265 | 266 |
| 266 // BrowserWithTestWindowTest: | 267 // BrowserWithTestWindowTest: |
| 267 TestingProfile* CreateProfile() override { | 268 TestingProfile* CreateProfile() override { |
| 268 // Ensure that the profile created by BrowserWithTestWindowTest is | 269 // Ensure that the profile created by BrowserWithTestWindowTest is |
| 269 // registered with |profile_manager_|. | 270 // registered with |profile_manager_|. |
| 270 return profile_manager_->CreateTestingProfile(kTestProfileName); | 271 return profile_manager_->CreateTestingProfile(kTestProfileName); |
| 271 } | 272 } |
| 272 void DestroyProfile(TestingProfile* profile) override { | 273 void DestroyProfile(TestingProfile* profile) override { |
| 273 return profile_manager_->DeleteTestingProfile(kTestProfileName); | 274 return profile_manager_->DeleteTestingProfile(kTestProfileName); |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 InitExtensionService(second_profile); | 750 InitExtensionService(second_profile); |
| 750 EXPECT_EQ(0, observer.num_updates()); | 751 EXPECT_EQ(0, observer.num_updates()); |
| 751 InstallExtension(keep_extension.get(), second_profile); | 752 InstallExtension(keep_extension.get(), second_profile); |
| 752 EXPECT_EQ(1, observer.num_updates()); | 753 EXPECT_EQ(1, observer.num_updates()); |
| 753 UninstallExtension(keep_extension.get(), second_profile); | 754 UninstallExtension(keep_extension.get(), second_profile); |
| 754 EXPECT_EQ(2, observer.num_updates()); | 755 EXPECT_EQ(2, observer.num_updates()); |
| 755 profile_manager_->DeleteTestingProfile(kSecondProfileName); | 756 profile_manager_->DeleteTestingProfile(kSecondProfileName); |
| 756 } | 757 } |
| 757 | 758 |
| 758 } // namespace chromeos | 759 } // namespace chromeos |
| OLD | NEW |