extension_sidebar_utils.h revision 72a454cd3513ac24fbdd0e0cb9ad70b86a99b801
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 3// found in the LICENSE file. 4 5#ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_UTILS_H_ 6#define CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_UTILS_H_ 7#pragma once 8 9#include <string> 10 11class Extension; 12class GURL; 13 14namespace extension_sidebar_utils { 15 16// Returns id of an extension owning a sidebar identified by |content_id|. 17std::string GetExtensionIdByContentId(const std::string& content_id); 18 19// Resolves |relative_path| relative to |extension|'s url. 20// In case of any problem, returns an empty invalid GURL and |error| receives 21// the corresponding error message. 22GURL ResolveRelativePath(const std::string& relative_path, 23 const Extension* extension, 24 std::string* error); 25 26} // namespace extension_sidebar_utils 27 28#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_UTILS_H_ 29