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

Unified Diff: athena/content/app_registry_impl.cc

Issue 863033002: Delete athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « athena/content/app_activity_unittest.cc ('k') | athena/content/chrome/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/content/app_registry_impl.cc
diff --git a/athena/content/app_registry_impl.cc b/athena/content/app_registry_impl.cc
deleted file mode 100644
index 9f89c3706cd99fdc96ed96b67ab845f129123d1f..0000000000000000000000000000000000000000
--- a/athena/content/app_registry_impl.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2014 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.
-
-#include "athena/content/public/app_registry.h"
-
-#include "athena/content/app_activity_registry.h"
-#include "base/logging.h"
-
-namespace athena {
-
-class AppRegistryImpl : public AppRegistry {
- public:
- AppRegistryImpl();
- ~AppRegistryImpl() override;
-
- // AppRegistry:
- AppActivityRegistry* GetAppActivityRegistry(
- const std::string& app_id,
- content::BrowserContext* browser_context) override;
- int NumberOfApplications() const override { return app_list_.size(); }
-
- private:
- void RemoveAppActivityRegistry(AppActivityRegistry* registry) override;
-
- std::vector<AppActivityRegistry*> app_list_;
-
- DISALLOW_COPY_AND_ASSIGN(AppRegistryImpl);
-};
-
-namespace {
-
-AppRegistryImpl* instance = nullptr;
-
-} // namespace
-
-AppRegistryImpl::AppRegistryImpl() {
-}
-AppRegistryImpl::~AppRegistryImpl() {
- DCHECK(app_list_.empty());
-}
-
-AppActivityRegistry* AppRegistryImpl::GetAppActivityRegistry(
- const std::string& app_id,
- content::BrowserContext* browser_context) {
- // Search for an existing proxy.
- for (std::vector<AppActivityRegistry*>::iterator it = app_list_.begin();
- it != app_list_.end(); ++it) {
- if ((*it)->app_id() == app_id &&
- (*it)->browser_context() == browser_context)
- return *it;
- }
-
- // Create and return a new application object.
- AppActivityRegistry* app_activity_registry =
- new AppActivityRegistry(app_id, browser_context);
- app_list_.push_back(app_activity_registry);
- return app_activity_registry;
-}
-
-void AppRegistryImpl::RemoveAppActivityRegistry(AppActivityRegistry* registry) {
- std::vector<AppActivityRegistry*>::iterator item =
- std::find(app_list_.begin(), app_list_.end(), registry);
- CHECK(item != app_list_.end());
- app_list_.erase(item);
- delete registry;
-}
-
-// static
-void AppRegistry::Create() {
- DCHECK(!instance);
- instance = new AppRegistryImpl();
-}
-
-// static
-AppRegistry* AppRegistry::Get() {
- DCHECK(instance);
- return instance;
-}
-
-// static
-void AppRegistry::ShutDown() {
- DCHECK(instance);
- delete instance;
-}
-
-AppRegistry::AppRegistry() {}
-
-AppRegistry::~AppRegistry() {
- instance = nullptr;
-}
-
-} // namespace athena
« no previous file with comments | « athena/content/app_activity_unittest.cc ('k') | athena/content/chrome/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698