Commit 0b6ccac1 authored by nancy's avatar nancy Committed by Commit Bot

Remove AppService enable function.

AppService has been enabled for a few releases and a few months, and it
will be enabled as default. So we don't need a function just
'return true' to reduce the function call for the chromebook start up
process.

BUG=1016159

Change-Id: I9aa30926267ae146802283fd9a2390a7724c407f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1933669Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Reviewed-by: default avatarHidehiko Abe <hidehiko@chromium.org>
Reviewed-by: default avatarAlexey Baskakov <loyso@chromium.org>
Reviewed-by: default avatarJeevan Shikaram <jshikaram@chromium.org>
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719436}
parent 544ed115
......@@ -40,11 +40,6 @@ AppServiceProxyFactory* AppServiceProxyFactory::GetInstance() {
return base::Singleton<AppServiceProxyFactory>::get();
}
// static
bool AppServiceProxyFactory::IsEnabled() {
return true;
}
AppServiceProxyFactory::AppServiceProxyFactory()
: BrowserContextKeyedServiceFactory(
"AppServiceProxy",
......
......@@ -22,8 +22,6 @@ class AppServiceProxyFactory : public BrowserContextKeyedServiceFactory {
static AppServiceProxyFactory* GetInstance();
static bool IsEnabled();
private:
friend struct base::DefaultSingletonTraits<AppServiceProxyFactory>;
......
......@@ -27,11 +27,6 @@ ArcAppsFactory* ArcAppsFactory::GetInstance() {
return base::Singleton<ArcAppsFactory>::get();
}
// static
bool ArcAppsFactory::IsEnabled() {
return AppServiceProxyFactory::IsEnabled();
}
// static
void ArcAppsFactory::ShutDownForTesting(content::BrowserContext* context) {
auto* factory = GetInstance();
......
......@@ -21,8 +21,6 @@ class ArcAppsFactory : public BrowserContextKeyedServiceFactory {
static ArcAppsFactory* GetInstance();
static bool IsEnabled();
static void ShutDownForTesting(content::BrowserContext* context);
private:
......
......@@ -233,9 +233,7 @@ void ArcServiceLauncher::OnPrimaryUserProfilePrepared(Profile* profile) {
ArcWakeLockBridge::GetForBrowserContext(profile);
ArcWallpaperService::GetForBrowserContext(profile);
GpuArcVideoServiceHost::GetForBrowserContext(profile);
if (apps::ArcAppsFactory::IsEnabled()) {
apps::ArcAppsFactory::GetForProfile(profile);
}
apps::ArcAppsFactory::GetForProfile(profile);
chromeos::ApkWebAppService::Get(profile);
// ARC Container-only services.
......
......@@ -204,9 +204,7 @@ void ChromeBrowserMainExtraPartsProfiles::
#endif
#if !defined(OS_ANDROID)
if (apps::AppServiceProxyFactory::IsEnabled()) {
apps::AppServiceProxyFactory::GetInstance();
}
apps::AppServiceProxyFactory::GetInstance();
#endif
AboutSigninInternalsFactory::GetInstance();
AccountConsistencyModeManagerFactory::GetInstance();
......
......@@ -101,11 +101,10 @@ void WebAppUiManagerImpl::UninstallAndReplace(
#endif
}
if (apps::AppServiceProxyFactory::IsEnabled()) {
apps::AppServiceProxy* proxy =
apps::AppServiceProxyFactory::GetForProfile(profile_);
proxy->Uninstall(from_app, nullptr /* parent_window */);
}
apps::AppServiceProxy* proxy =
apps::AppServiceProxyFactory::GetForProfile(profile_);
DCHECK(proxy);
proxy->Uninstall(from_app, nullptr /* parent_window */);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment