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

Side by Side Diff: chrome/common/extensions/manifest.cc

Issue 8849010: Add 'web_accessible_resource" keyword for version 2 extension manifests. This makes extension res... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/extensions/manifest.h" 5 #include "chrome/common/extensions/manifest.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 map[keys::kPermissions] = all_but_themes; 53 map[keys::kPermissions] = all_but_themes;
54 map[keys::kOptionalPermissions] = all_but_themes; 54 map[keys::kOptionalPermissions] = all_but_themes;
55 map[keys::kOptionsPage] = all_but_themes; 55 map[keys::kOptionsPage] = all_but_themes;
56 map[keys::kBackground] = all_but_themes; 56 map[keys::kBackground] = all_but_themes;
57 map[keys::kOfflineEnabled] = all_but_themes; 57 map[keys::kOfflineEnabled] = all_but_themes;
58 map[keys::kMinimumChromeVersion] = all_but_themes; 58 map[keys::kMinimumChromeVersion] = all_but_themes;
59 map[keys::kRequirements] = all_but_themes; 59 map[keys::kRequirements] = all_but_themes;
60 map[keys::kConvertedFromUserScript] = all_but_themes; 60 map[keys::kConvertedFromUserScript] = all_but_themes;
61 map[keys::kNaClModules] = all_but_themes; 61 map[keys::kNaClModules] = all_but_themes;
62 map[keys::kPlugins] = all_but_themes; 62 map[keys::kPlugins] = all_but_themes;
63 map[keys::kWebAccessibleResources] = all_but_themes;
abarth-chromium 2011/12/08 23:52:45 Do hosted apps use this key too?
Cris Neckar 2011/12/09 00:06:22 I'm not sure.. Aaron should be able to answer this
63 64
64 // Extensions and packaged apps. 65 // Extensions and packaged apps.
65 int ext_and_packaged = 66 int ext_and_packaged =
66 Manifest::kTypeExtension | Manifest::kTypePackagedApp; 67 Manifest::kTypeExtension | Manifest::kTypePackagedApp;
67 map[keys::kContentScripts] = ext_and_packaged; 68 map[keys::kContentScripts] = ext_and_packaged;
68 map[keys::kOmnibox] = ext_and_packaged; 69 map[keys::kOmnibox] = ext_and_packaged;
69 map[keys::kDevToolsPage] = ext_and_packaged; 70 map[keys::kDevToolsPage] = ext_and_packaged;
70 map[keys::kSidebar] = ext_and_packaged; 71 map[keys::kSidebar] = ext_and_packaged;
71 map[keys::kHomepageURL] = ext_and_packaged; 72 map[keys::kHomepageURL] = ext_and_packaged;
72 map[keys::kChromeURLOverrides] = ext_and_packaged; 73 map[keys::kChromeURLOverrides] = ext_and_packaged;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 221
221 bool Manifest::CanAccessPath(const std::string& path) const { 222 bool Manifest::CanAccessPath(const std::string& path) const {
222 std::vector<std::string> components; 223 std::vector<std::string> components;
223 base::SplitString(path, '.', &components); 224 base::SplitString(path, '.', &components);
224 225
225 Restrictions restrictions = g_restrictions.Get(); 226 Restrictions restrictions = g_restrictions.Get();
226 return restrictions.CanAccessKey(components[0], GetType()); 227 return restrictions.CanAccessKey(components[0], GetType());
227 } 228 }
228 229
229 } // namespace extensions 230 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698