Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: chrome/browser/apps/app_shim/test/app_shim_host_manager_test_api_mac.cc

Issue 2729503007: Remove Profile usage from //apps (Closed)
Patch Set: deps Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/apps/app_shim/test/app_shim_host_manager_test_api_mac.h " 5 #include "chrome/browser/apps/app_shim/test/app_shim_host_manager_test_api_mac.h "
6 6
7 #include "apps/app_lifetime_monitor_factory.h" 7 #include "apps/app_lifetime_monitor_factory.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "chrome/browser/apps/app_shim/app_shim_host_manager_mac.h" 9 #include "chrome/browser/apps/app_shim/app_shim_host_manager_mac.h"
10 #include "chrome/browser/apps/app_shim/extension_app_shim_handler_mac.h" 10 #include "chrome/browser/apps/app_shim/extension_app_shim_handler_mac.h"
(...skipping 19 matching lines...) Expand all
30 void AppShimHostManagerTestApi::SetExtensionAppShimHandler( 30 void AppShimHostManagerTestApi::SetExtensionAppShimHandler(
31 std::unique_ptr<apps::ExtensionAppShimHandler> handler) { 31 std::unique_ptr<apps::ExtensionAppShimHandler> handler) {
32 apps::AppShimHandler::SetDefaultHandler(nullptr); 32 apps::AppShimHandler::SetDefaultHandler(nullptr);
33 apps::AppShimHandler::SetDefaultHandler(handler.get()); 33 apps::AppShimHandler::SetDefaultHandler(handler.get());
34 host_manager_->extension_app_shim_handler_.swap(handler); 34 host_manager_->extension_app_shim_handler_.swap(handler);
35 35
36 // Remove old handler from all AppLifetimeMonitors. Usually this is done at 36 // Remove old handler from all AppLifetimeMonitors. Usually this is done at
37 // profile destruction. 37 // profile destruction.
38 for (Profile* profile : 38 for (Profile* profile :
39 g_browser_process->profile_manager()->GetLoadedProfiles()) { 39 g_browser_process->profile_manager()->GetLoadedProfiles()) {
40 apps::AppLifetimeMonitorFactory::GetForProfile(profile) 40 apps::AppLifetimeMonitorFactory::GetForBrowserContext(profile)
41 ->RemoveObserver(handler.get()); 41 ->RemoveObserver(handler.get());
42 } 42 }
43 } 43 }
44 44
45 } // namespace test 45 } // namespace test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698