Chromium Code Reviews| Index: chrome/browser/extensions/external_extension_util.h |
| =================================================================== |
| --- chrome/browser/extensions/external_extension_util.h (revision 0) |
| +++ chrome/browser/extensions/external_extension_util.h (revision 0) |
| @@ -0,0 +1,28 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_UTIL_H_ |
| +#define CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_UTIL_H_ |
| +#pragma once |
| + |
| +namespace base { |
| +class DictionaryValue; |
| +class ValueSerializer; |
| +} |
| +class FilePath; |
| + |
| +// Provides various utility functions for external extension manipulation. |
| +class ExternalExtensionUtil { |
|
Finnur
2012/04/25 13:33:45
I still don't see a reason why this is a class and
Alexandre Abreu
2012/04/25 15:31:05
Agree, as in many other places, I tried to follow
|
| + public: |
| + // Extracts/expect a file content in json format. |
| + // Used by the external extension facilities/providers |
| + // to parse their extension manifests designated by |path|. |
| + // An empty dictionary is returned in case of failure (e.g. invalid |
| + // path or json content). |
| + // Caller takes ownership of the returned dictionary. |
| + static base::DictionaryValue* ExtractExtensionPrefs(const FilePath& path, |
| + base::ValueSerializer* serializer); |
|
Finnur
2012/04/25 13:33:45
Can you add WARN_UNUSED_RESULT to the end (before
Alexandre Abreu
2012/04/25 15:31:05
Sorry missed that.
Done.
|
| +}; |
| + |
| +#endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_UTIL_H_ |