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/common/ash_switches.h" | 9 #include "ash/common/ash_switches.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 profile()->GetPrefs()->SetBoolean(prefs::kArcEnabled, flags & ENABLE_ARC); | 172 profile()->GetPrefs()->SetBoolean(prefs::kArcEnabled, flags & ENABLE_ARC); |
173 arc_test_.SetUp(profile()); | 173 arc_test_.SetUp(profile()); |
174 arc::ArcServiceManager::Get() | 174 arc::ArcServiceManager::Get() |
175 ->arc_bridge_service() | 175 ->arc_bridge_service() |
176 ->intent_helper() | 176 ->intent_helper() |
177 ->SetInstance(&intent_helper_); | 177 ->SetInstance(&intent_helper_); |
178 | 178 |
179 if (flags & ENABLE_PALETTE) { | 179 if (flags & ENABLE_PALETTE) { |
180 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 180 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
181 ash::switches::kAshEnablePalette); | 181 ash::switches::kAshForceEnablePalette); |
182 } | 182 } |
183 | 183 |
184 // TODO(derat): Sigh, something in ArcAppTest appears to be re-enabling ARC. | 184 // TODO(derat): Sigh, something in ArcAppTest appears to be re-enabling ARC. |
185 profile()->GetPrefs()->SetBoolean(prefs::kArcEnabled, flags & ENABLE_ARC); | 185 profile()->GetPrefs()->SetBoolean(prefs::kArcEnabled, flags & ENABLE_ARC); |
186 NoteTakingHelper::Initialize(); | 186 NoteTakingHelper::Initialize(); |
187 NoteTakingHelper::Get()->set_launch_chrome_app_callback_for_test(base::Bind( | 187 NoteTakingHelper::Get()->set_launch_chrome_app_callback_for_test(base::Bind( |
188 &NoteTakingHelperTest::LaunchChromeApp, base::Unretained(this))); | 188 &NoteTakingHelperTest::LaunchChromeApp, base::Unretained(this))); |
189 } | 189 } |
190 | 190 |
191 // Creates an extension. | 191 // Creates an extension. |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 InitExtensionService(second_profile); | 629 InitExtensionService(second_profile); |
630 EXPECT_EQ(0, observer.num_updates()); | 630 EXPECT_EQ(0, observer.num_updates()); |
631 InstallExtension(keep_extension.get(), second_profile); | 631 InstallExtension(keep_extension.get(), second_profile); |
632 EXPECT_EQ(1, observer.num_updates()); | 632 EXPECT_EQ(1, observer.num_updates()); |
633 UninstallExtension(keep_extension.get(), second_profile); | 633 UninstallExtension(keep_extension.get(), second_profile); |
634 EXPECT_EQ(2, observer.num_updates()); | 634 EXPECT_EQ(2, observer.num_updates()); |
635 profile_manager_->DeleteTestingProfile(kSecondProfileName); | 635 profile_manager_->DeleteTestingProfile(kSecondProfileName); |
636 } | 636 } |
637 | 637 |
638 } // namespace chromeos | 638 } // namespace chromeos |
OLD | NEW |