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

Unified Diff: chrome/browser/apps/ephemeral_app_service.h

Issue 1497193002: Remove all the ephemeral apps code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review, Devlin review. Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/apps/ephemeral_app_browsertest.cc ('k') | chrome/browser/apps/ephemeral_app_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/ephemeral_app_service.h
diff --git a/chrome/browser/apps/ephemeral_app_service.h b/chrome/browser/apps/ephemeral_app_service.h
deleted file mode 100644
index d8b1a8965bfad61463dfb49790daf6d54d2da1a9..0000000000000000000000000000000000000000
--- a/chrome/browser/apps/ephemeral_app_service.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_APPS_EPHEMERAL_APP_SERVICE_H_
-#define CHROME_BROWSER_APPS_EPHEMERAL_APP_SERVICE_H_
-
-#include <set>
-
-#include "apps/app_lifetime_monitor.h"
-#include "base/memory/weak_ptr.h"
-#include "base/scoped_observer.h"
-#include "components/keyed_service/core/keyed_service.h"
-#include "extensions/browser/extension_registry_observer.h"
-
-class Profile;
-
-namespace extensions {
-class Extension;
-class ExtensionRegistry;
-} // namespace extensions
-
-// Delete cached ephemeral apps at startup.
-// TODO(benwells): Remove this system. https://crbug.com/517735.
-class EphemeralAppService : public KeyedService,
- public extensions::ExtensionRegistryObserver,
- public apps::AppLifetimeMonitor::Observer {
- public:
- // Returns the instance for the given profile. This is a convenience wrapper
- // around EphemeralAppServiceFactory::GetForProfile.
- static EphemeralAppService* Get(Profile* profile);
-
- explicit EphemeralAppService(Profile* profile);
- ~EphemeralAppService() override;
-
- // Clears the ephemeral app cache. Removes all idle ephemeral apps.
- void ClearCachedApps();
-
- void set_disable_delay_for_test(int delay) {
- disable_idle_app_delay_ = delay;
- }
-
- private:
- // extensions::ExtensionRegistryObserver.
- void OnExtensionWillBeInstalled(content::BrowserContext* browser_context,
- const extensions::Extension* extension,
- bool is_update,
- bool from_ephemeral,
- const std::string& old_name) override;
-
- // apps::AppLifetimeMonitor::Observer implementation.
- void OnAppStop(Profile* profile, const std::string& app_id) override;
- void OnChromeTerminating() override;
-
- void Init();
-
- void DisableEphemeralApp(const std::string& app_id);
-
- void HandleEphemeralAppPromoted(const extensions::Extension* app);
-
- Profile* profile_;
-
- ScopedObserver<extensions::ExtensionRegistry,
- extensions::ExtensionRegistryObserver>
- extension_registry_observer_;
- ScopedObserver<apps::AppLifetimeMonitor, apps::AppLifetimeMonitor::Observer>
- app_lifetime_monitor_observer_;
-
- // Number of seconds before disabling idle ephemeral apps.
- // Overridden in tests.
- int disable_idle_app_delay_;
-
- base::WeakPtrFactory<EphemeralAppService> weak_ptr_factory_;
-
- friend class EphemeralAppServiceBrowserTest;
-
- DISALLOW_COPY_AND_ASSIGN(EphemeralAppService);
-};
-
-#endif // CHROME_BROWSER_APPS_EPHEMERAL_APP_SERVICE_H_
« no previous file with comments | « chrome/browser/apps/ephemeral_app_browsertest.cc ('k') | chrome/browser/apps/ephemeral_app_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698