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

Side by Side Diff: chrome/common/extensions/extension_sidebar_utils.h

Issue 6378009: Only allow extension pages to be displayed in the sidebar to be consistent... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_UTILS_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_UTILS_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_UTILS_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_UTILS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 class Extension; 11 class Extension;
12 class GURL; 12 class GURL;
13 13
14 namespace extension_sidebar_utils { 14 namespace extension_sidebar_utils {
15 15
16 // Returns id of an extension owning a sidebar identified by |content_id|. 16 // Returns id of an extension owning a sidebar identified by |content_id|.
17 std::string GetExtensionIdByContentId(const std::string& content_id); 17 std::string GetExtensionIdByContentId(const std::string& content_id);
18 18
19 // Resolves |url_string| relative to |extension|'s url and verifies it 19 // Resolves |relative_path| relative to |extension|'s url.
20 // against |extension|'s host permissions.
21 // In case of any problem, returns an empty invalid GURL and |error| receives 20 // In case of any problem, returns an empty invalid GURL and |error| receives
22 // the corresponding error message. 21 // the corresponding error message.
23 GURL ResolveAndVerifyUrl(const std::string& url_string, 22 GURL ResolveRelativePath(const std::string& relative_path,
24 const Extension* extension, 23 const Extension* extension,
25 std::string* error); 24 std::string* error);
26 25
27 } // namespace extension_sidebar_utils 26 } // namespace extension_sidebar_utils
28 27
29 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_UTILS_H_ 28 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_sidebar_defaults.h ('k') | chrome/common/extensions/extension_sidebar_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698