diff options
author | ricow@chromium.org <ricow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-10 10:36:38 +0000 |
---|---|---|
committer | ricow@chromium.org <ricow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-10 10:36:38 +0000 |
commit | 85db26ae55f5b20a32884e38ce39b8ba449238b1 (patch) | |
tree | a02f9b02c8069f59db7a422074679055238f3faf /chrome/browser/extensions/api/permissions | |
parent | 9f741afba36e3e7a4a9e046ee84e99b1d1dffbe2 (diff) | |
download | chromium_src-85db26ae55f5b20a32884e38ce39b8ba449238b1.zip chromium_src-85db26ae55f5b20a32884e38ce39b8ba449238b1.tar.gz chromium_src-85db26ae55f5b20a32884e38ce39b8ba449238b1.tar.bz2 |
Revert 176015
> Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it
> was only run on IDL files. Clean up all the code which that simplifies.
>
> TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org
> BUG=141318
>
> Review URL: https://chromiumcodereview.appspot.com/11747025
This seems to be causing complation failures on release win builders:
http://chromegw/i/chromium.chrome/builders/Google%20Chrome%20Win/builds/15702
TBR=kalman@chromium.org
Review URL: https://codereview.chromium.org/11826048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176047 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/permissions')
3 files changed, 27 insertions, 27 deletions
diff --git a/chrome/browser/extensions/api/permissions/permissions_api.cc b/chrome/browser/extensions/api/permissions/permissions_api.cc index ba71c9c..c395b9d 100644 --- a/chrome/browser/extensions/api/permissions/permissions_api.cc +++ b/chrome/browser/extensions/api/permissions/permissions_api.cc @@ -52,7 +52,7 @@ bool ignore_user_gesture_for_tests = false; } // namespace -bool PermissionsContainsFunction::RunImpl() { +bool ContainsPermissionsFunction::RunImpl() { scoped_ptr<Contains::Params> params(Contains::Params::Create(*args_)); scoped_refptr<PermissionSet> permissions = @@ -65,14 +65,14 @@ bool PermissionsContainsFunction::RunImpl() { return true; } -bool PermissionsGetAllFunction::RunImpl() { +bool GetAllPermissionsFunction::RunImpl() { scoped_ptr<Permissions> permissions = helpers::PackPermissionSet(GetExtension()->GetActivePermissions()); results_ = GetAll::Results::Create(*permissions); return true; } -bool PermissionsRemoveFunction::RunImpl() { +bool RemovePermissionsFunction::RunImpl() { scoped_ptr<Remove::Params> params(Remove::Params::Create(*args_)); EXTENSION_FUNCTION_VALIDATE(params.get()); @@ -110,19 +110,19 @@ bool PermissionsRemoveFunction::RunImpl() { } // static -void PermissionsRequestFunction::SetAutoConfirmForTests(bool should_proceed) { +void RequestPermissionsFunction::SetAutoConfirmForTests(bool should_proceed) { auto_confirm_for_tests = should_proceed ? PROCEED : ABORT; } // static -void PermissionsRequestFunction::SetIgnoreUserGestureForTests( +void RequestPermissionsFunction::SetIgnoreUserGestureForTests( bool ignore) { ignore_user_gesture_for_tests = ignore; } -PermissionsRequestFunction::PermissionsRequestFunction() {} +RequestPermissionsFunction::RequestPermissionsFunction() {} -void PermissionsRequestFunction::InstallUIProceed() { +void RequestPermissionsFunction::InstallUIProceed() { PermissionsUpdater perms_updater(profile()); perms_updater.AddPermissions(GetExtension(), requested_permissions_.get()); @@ -132,16 +132,16 @@ void PermissionsRequestFunction::InstallUIProceed() { Release(); // Balanced in RunImpl(). } -void PermissionsRequestFunction::InstallUIAbort(bool user_initiated) { +void RequestPermissionsFunction::InstallUIAbort(bool user_initiated) { results_ = Request::Results::Create(false); SendResponse(true); Release(); // Balanced in RunImpl(). } -PermissionsRequestFunction::~PermissionsRequestFunction() {} +RequestPermissionsFunction::~RequestPermissionsFunction() {} -bool PermissionsRequestFunction::RunImpl() { +bool RequestPermissionsFunction::RunImpl() { if (!user_gesture() && !ignore_user_gesture_for_tests) { error_ = kUserGestureRequiredError; return false; diff --git a/chrome/browser/extensions/api/permissions/permissions_api.h b/chrome/browser/extensions/api/permissions/permissions_api.h index 21281e2..9801ea1 100644 --- a/chrome/browser/extensions/api/permissions/permissions_api.h +++ b/chrome/browser/extensions/api/permissions/permissions_api.h @@ -15,48 +15,48 @@ class ExtensionService; // chrome.permissions.contains -class PermissionsContainsFunction : public SyncExtensionFunction { +class ContainsPermissionsFunction : public SyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION_NAME("permissions.contains") protected: - virtual ~PermissionsContainsFunction() {} + virtual ~ContainsPermissionsFunction() {} // ExtensionFunction: virtual bool RunImpl() OVERRIDE; }; // chrome.permissions.getAll -class PermissionsGetAllFunction : public SyncExtensionFunction { +class GetAllPermissionsFunction : public SyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION_NAME("permissions.getAll") protected: - virtual ~PermissionsGetAllFunction() {} + virtual ~GetAllPermissionsFunction() {} // ExtensionFunction: virtual bool RunImpl() OVERRIDE; }; // chrome.permissions.remove -class PermissionsRemoveFunction : public SyncExtensionFunction { +class RemovePermissionsFunction : public SyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION_NAME("permissions.remove") protected: - virtual ~PermissionsRemoveFunction() {} + virtual ~RemovePermissionsFunction() {} // ExtensionFunction: virtual bool RunImpl() OVERRIDE; }; // chrome.permissions.request -class PermissionsRequestFunction : public AsyncExtensionFunction, +class RequestPermissionsFunction : public AsyncExtensionFunction, public ExtensionInstallPrompt::Delegate { public: DECLARE_EXTENSION_FUNCTION_NAME("permissions.request") - PermissionsRequestFunction(); + RequestPermissionsFunction(); // FOR TESTS ONLY to bypass the confirmation UI. static void SetAutoConfirmForTests(bool should_proceed); @@ -67,7 +67,7 @@ class PermissionsRequestFunction : public AsyncExtensionFunction, virtual void InstallUIAbort(bool user_initiated) OVERRIDE; protected: - virtual ~PermissionsRequestFunction(); + virtual ~RequestPermissionsFunction(); // ExtensionFunction: virtual bool RunImpl() OVERRIDE; diff --git a/chrome/browser/extensions/api/permissions/permissions_apitest.cc b/chrome/browser/extensions/api/permissions/permissions_apitest.cc index a3944b5..4006d9b 100644 --- a/chrome/browser/extensions/api/permissions/permissions_apitest.cc +++ b/chrome/browser/extensions/api/permissions/permissions_apitest.cc @@ -85,7 +85,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OptionalPermissionsGranted) { prefs->AddGrantedPermissions("kjmkgkdkpedkejedfhmfcenooemhbpbo", granted_permissions); - PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); + RequestPermissionsFunction::SetIgnoreUserGestureForTests(true); host_resolver()->AddRule("*.com", "127.0.0.1"); ASSERT_TRUE(StartTestServer()); EXPECT_TRUE(RunExtensionTest("permissions/optional")) << message_; @@ -95,8 +95,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OptionalPermissionsGranted) { IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OptionalPermissionsAutoConfirm) { // Rather than setting the granted permissions, set the UI autoconfirm flag // and run the same tests. - PermissionsRequestFunction::SetAutoConfirmForTests(true); - PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); + RequestPermissionsFunction::SetAutoConfirmForTests(true); + RequestPermissionsFunction::SetIgnoreUserGestureForTests(true); host_resolver()->AddRule("*.com", "127.0.0.1"); ASSERT_TRUE(StartTestServer()); EXPECT_TRUE(RunExtensionTest("permissions/optional")) << message_; @@ -107,15 +107,15 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OptionalPermissionsAutoConfirm) { IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ComplexOptionalPermissions) { // Rather than setting the granted permissions, set the UI autoconfirm flag // and run the same tests. - PermissionsRequestFunction::SetAutoConfirmForTests(true); - PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); + RequestPermissionsFunction::SetAutoConfirmForTests(true); + RequestPermissionsFunction::SetIgnoreUserGestureForTests(true); EXPECT_TRUE(RunExtensionTest("permissions/complex_optional")) << message_; } // Test that denying the optional permissions confirmation dialog works. IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OptionalPermissionsDeny) { - PermissionsRequestFunction::SetAutoConfirmForTests(false); - PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); + RequestPermissionsFunction::SetAutoConfirmForTests(false); + RequestPermissionsFunction::SetIgnoreUserGestureForTests(true); host_resolver()->AddRule("*.com", "127.0.0.1"); ASSERT_TRUE(StartTestServer()); EXPECT_TRUE(RunExtensionTest("permissions/optional_deny")) << message_; @@ -124,7 +124,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OptionalPermissionsDeny) { // Tests that the permissions.request function must be called from within a // user gesture. IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OptionalPermissionsGesture) { - PermissionsRequestFunction::SetIgnoreUserGestureForTests(false); + RequestPermissionsFunction::SetIgnoreUserGestureForTests(false); host_resolver()->AddRule("*.com", "127.0.0.1"); ASSERT_TRUE(StartTestServer()); EXPECT_TRUE(RunExtensionTest("permissions/optional_gesture")) << message_; |