diff options
author | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-03 19:32:25 +0000 |
---|---|---|
committer | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-03 19:32:25 +0000 |
commit | 71470b9f6ffa0c2432ecae186565569768c414a8 (patch) | |
tree | 57c1965dfdbd3e48cbbbaa1bdcba3e75bac0e1b1 /extensions | |
parent | 019bfaf280063fc5f0cbeb2936d4d26cf2b1e7d7 (diff) | |
download | chromium_src-71470b9f6ffa0c2432ecae186565569768c414a8.zip chromium_src-71470b9f6ffa0c2432ecae186565569768c414a8.tar.gz chromium_src-71470b9f6ffa0c2432ecae186565569768c414a8.tar.bz2 |
app_shell: Add ShellContentRendererClient
This is a step toward getting app_shell to initialize a renderer with extension support.
* Add apps/shell/renderer so we can separate out the render process code
* Do a little bit of cleanup in the Permissions system, which is the next thing to tackle.
BUG=335632
TEST=none
Review URL: https://codereview.chromium.org/149163002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/common/extensions_client.cc | 2 | ||||
-rw-r--r-- | extensions/common/permissions/api_permission.h | 3 | ||||
-rw-r--r-- | extensions/common/permissions/permission_set.cc | 1 | ||||
-rw-r--r-- | extensions/common/permissions/permissions_info.cc | 1 |
4 files changed, 4 insertions, 3 deletions
diff --git a/extensions/common/extensions_client.cc b/extensions/common/extensions_client.cc index ccca164..89795b8 100644 --- a/extensions/common/extensions_client.cc +++ b/extensions/common/extensions_client.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/basictypes.h" +#include "base/logging.h" #include "extensions/common/extensions_client.h" namespace extensions { @@ -14,6 +15,7 @@ ExtensionsClient* g_client = NULL; } // namespace ExtensionsClient* ExtensionsClient::Get() { + DCHECK(g_client); return g_client; } diff --git a/extensions/common/permissions/api_permission.h b/extensions/common/permissions/api_permission.h index f50dada..6427e57 100644 --- a/extensions/common/permissions/api_permission.h +++ b/extensions/common/permissions/api_permission.h @@ -311,8 +311,7 @@ class APIPermissionInfo { } private: - // Instances should only be constructed from within a - // PermissionsInfo::Delegate. + // Instances should only be constructed from within a PermissionsProvider. friend class ChromeAPIPermissions; // Implementations of APIPermission will want to get the permission message, // but this class's implementation should be hidden from everyone else. diff --git a/extensions/common/permissions/permission_set.cc b/extensions/common/permissions/permission_set.cc index 8ec1cbe..fd32d4e 100644 --- a/extensions/common/permissions/permission_set.cc +++ b/extensions/common/permissions/permission_set.cc @@ -180,6 +180,7 @@ bool PermissionSet::HasAPIPermission( bool PermissionSet::HasAPIPermission(const std::string& permission_name) const { const APIPermissionInfo* permission = PermissionsInfo::GetInstance()->GetByName(permission_name); + // Ensure our PermissionsProvider is aware of this permission. CHECK(permission) << permission_name; return (permission && apis_.count(permission->id())); } diff --git a/extensions/common/permissions/permissions_info.cc b/extensions/common/permissions/permissions_info.cc index bac3d9c1..e4684aa 100644 --- a/extensions/common/permissions/permissions_info.cc +++ b/extensions/common/permissions/permissions_info.cc @@ -64,7 +64,6 @@ bool PermissionsInfo::HasChildPermissions(const std::string& name) const { PermissionsInfo::PermissionsInfo() : hosted_app_permission_count_(0), permission_count_(0) { - DCHECK(ExtensionsClient::Get()); InitializeWithProvider(ExtensionsClient::Get()->GetPermissionsProvider()); } |