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

Unified Diff: chrome/browser/extensions/external_provider_interface.h

Issue 82773002: Move some dependencies of ExtensionService down to extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Presubmit check fixed Created 7 years, 1 month 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/extensions/external_provider_impl.cc ('k') | chrome/browser/extensions/install_verifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/external_provider_interface.h
diff --git a/chrome/browser/extensions/external_provider_interface.h b/chrome/browser/extensions/external_provider_interface.h
deleted file mode 100644
index d839a63179d47225a78f48702547255674566ed9..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/external_provider_interface.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 2012 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_EXTENSIONS_EXTERNAL_PROVIDER_INTERFACE_H_
-#define CHROME_BROWSER_EXTENSIONS_EXTERNAL_PROVIDER_INTERFACE_H_
-
-#include <vector>
-
-#include "base/memory/linked_ptr.h"
-#include "extensions/common/manifest.h"
-
-class GURL;
-
-namespace base {
-class FilePath;
-class Version;
-}
-
-namespace extensions {
-
-// This class is an abstract class for implementing external extensions
-// providers.
-class ExternalProviderInterface {
- public:
- // ExternalProvider uses this interface to communicate back to the
- // caller what extensions are registered, and which |id|, |version| and |path|
- // they have. See also VisitRegisteredExtension below. Ownership of |version|
- // is not transferred to the visitor. Callers of the methods below must
- // ensure that |id| is a valid extension id (use Extension::IdIsValid(id)).
- class VisitorInterface {
- public:
- // Return true if the extension install will proceed. Install will not
- // proceed if the extension is already installed from a higher priority
- // location.
- virtual bool OnExternalExtensionFileFound(
- const std::string& id,
- const base::Version* version,
- const base::FilePath& path,
- Manifest::Location location,
- int creation_flags,
- bool mark_acknowledged) = 0;
-
- // Return true if the extension install will proceed. Install might not
- // proceed if the extension is already installed from a higher priority
- // location.
- virtual bool OnExternalExtensionUpdateUrlFound(
- const std::string& id,
- const GURL& update_url,
- Manifest::Location location,
- int creation_flags,
- bool mark_acknowledged) = 0;
-
- // Called after all the external extensions have been reported
- // through the above two methods. |provider| is a pointer to the
- // provider that is now ready (typically this), and the
- // implementation of OnExternalProviderReady() should be able to
- // safely assert that provider->IsReady().
- virtual void OnExternalProviderReady(
- const ExternalProviderInterface* provider) = 0;
-
- protected:
- virtual ~VisitorInterface() {}
- };
-
- virtual ~ExternalProviderInterface() {}
-
- // The visitor (ExtensionsService) calls this function before it goes away.
- virtual void ServiceShutdown() = 0;
-
- // Enumerate registered extensions, calling
- // OnExternalExtension(File|UpdateUrl)Found on the |visitor| object for each
- // registered extension found.
- virtual void VisitRegisteredExtension() = 0;
-
- // Test if this provider has an extension with id |id| registered.
- virtual bool HasExtension(const std::string& id) const = 0;
-
- // Gets details of an extension by its id. Output params will be set only
- // if they are not NULL. If an output parameter is not specified by the
- // provider type, it will not be changed.
- // This function is no longer used outside unit tests.
- virtual bool GetExtensionDetails(
- const std::string& id,
- Manifest::Location* location,
- scoped_ptr<base::Version>* version) const = 0;
-
- // Determines if this provider had loaded the list of external extensions
- // from its source.
- virtual bool IsReady() const = 0;
-};
-
-typedef std::vector<linked_ptr<ExternalProviderInterface> >
- ProviderCollection;
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_PROVIDER_INTERFACE_H_
« no previous file with comments | « chrome/browser/extensions/external_provider_impl.cc ('k') | chrome/browser/extensions/install_verifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698