summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/requirements_checker.h
diff options
context:
space:
mode:
authorkhorimoto@chromium.org <khorimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-10 23:26:32 +0000
committerkhorimoto@chromium.org <khorimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-10 23:26:32 +0000
commit73cc9f95a698f1633e2e785fbb225f38facd016f (patch)
treebf16ee18744b741ab6d372c370a46349044c9683 /chrome/browser/extensions/requirements_checker.h
parent90848a5e02eb6c273292673819cca6854c5f2966 (diff)
downloadchromium_src-73cc9f95a698f1633e2e785fbb225f38facd016f.zip
chromium_src-73cc9f95a698f1633e2e785fbb225f38facd016f.tar.gz
chromium_src-73cc9f95a698f1633e2e785fbb225f38facd016f.tar.bz2
Revert 155861 - Enforce the 'requirements' field in manifests.
Implemented for the "plugins" and "3d" options. BUG=133027, 130405 Review URL: https://chromiumcodereview.appspot.com/10689097 TBR=eaugusti@chromium.org Review URL: https://chromiumcodereview.appspot.com/10916220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/requirements_checker.h')
-rw-r--r--chrome/browser/extensions/requirements_checker.h58
1 files changed, 0 insertions, 58 deletions
diff --git a/chrome/browser/extensions/requirements_checker.h b/chrome/browser/extensions/requirements_checker.h
deleted file mode 100644
index cca3503..0000000
--- a/chrome/browser/extensions/requirements_checker.h
+++ /dev/null
@@ -1,58 +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_REQUIREMENTS_CHECKER_H_
-#define CHROME_BROWSER_EXTENSIONS_REQUIREMENTS_CHECKER_H_
-
-#include <vector>
-
-#include "base/callback.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "chrome/browser/extensions/extension_service.h"
-
-class GPUFeatureChecker;
-
-namespace extensions {
-class Extension;
-
-// Validates the 'requirements' extension manifest field. This is an
-// asynchronous process that involves several threads, but the public interface
-// of this class (including constructor and destructor) must only be used on
-// the UI thread.
-class RequirementsChecker : public base::SupportsWeakPtr<RequirementsChecker> {
- public:
- RequirementsChecker();
- ~RequirementsChecker();
-
- // The vector passed to the callback are any localized errors describing
- // requirement violations. If this vector is non-empty, requirements checking
- // failed. This should only be called once. |callback| will always be invoked
- // asynchronously on the UI thread. |callback| will only be called once, and
- // will be reset after called.
- void Check(scoped_refptr<const Extension> extension,
- base::Callback<void(std::vector<std::string> requirement)> callback);
-
- private:
- // Callbacks for the GPUFeatureChecker.
- void SetWebGLAvailability(bool available);
- void SetCSS3DAvailability(bool available);
-
- void MaybeRunCallback();
-
- std::vector<std::string> errors_;
-
- // Every requirement that needs to be resolved asynchronously will add to
- // this counter. When the counter is depleted, the callback will be run.
- int pending_requirement_checks_;
-
- scoped_refptr<GPUFeatureChecker> webgl_checker_;
- scoped_refptr<GPUFeatureChecker> css3d_checker_;
-
- base::Callback<void(std::vector<std::string> requirement_errorss)> callback_;
-};
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_EXTENSIONS_REQUIREMENTS_CHECKER_H_