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

Side by Side Diff: extensions/common/manifest_handler_helpers.h

Issue 1537473003: Change extension icon load errors to warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: conciser Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_COMMON_MANIFEST_HANDLER_HELPERS_H_ 5 #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLER_HELPERS_H_
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLER_HELPERS_H_ 6 #define EXTENSIONS_COMMON_MANIFEST_HANDLER_HELPERS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector>
Devlin 2015/12/17 17:23:08 ?
Evan Stade 2015/12/17 20:15:58 oops, both the new includes date back to a version
9 10
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "extensions/common/install_warning.h"
12 14
13 class ExtensionIconSet; 15 class ExtensionIconSet;
14 16
15 namespace base { 17 namespace base {
16 class DictionaryValue; 18 class DictionaryValue;
17 } 19 }
18 20
19 namespace extensions { 21 namespace extensions {
22
23 class Extension;
24
20 namespace manifest_handler_helpers { 25 namespace manifest_handler_helpers {
21 26
22 // Strips leading slashes from the file path. Returns true iff the final path is 27 // Strips leading slashes from the file path. Returns true iff the final path is
23 // non empty. 28 // non empty.
24 bool NormalizeAndValidatePath(std::string* path); 29 bool NormalizeAndValidatePath(std::string* path);
25 30
26 // Loads icon paths defined in dictionary |icons_value| into ExtensionIconSet 31 // Loads icon paths defined in dictionary |icons_value| into ExtensionIconSet
27 // |icons|. |icons_value| is a dictionary value {icon size -> icon path}. 32 // |icons|. |icons_value| is a dictionary value {icon size -> icon path}.
28 // Returns success. If load fails, |error| will be set. 33 // Returns success. If load fails, |error| will be set. Non-failure warnings may
29 bool LoadIconsFromDictionary(const base::DictionaryValue* icons_value, 34 // be added to |extension|.
35 bool LoadIconsFromDictionary(Extension* extension,
36 const base::DictionaryValue* icons_value,
30 ExtensionIconSet* icons, 37 ExtensionIconSet* icons,
31 base::string16* error); 38 base::string16* error);
32 39
33 } // namespace manifest_handler_helpers 40 } // namespace manifest_handler_helpers
34 } // namespace extensions 41 } // namespace extensions
35 42
36 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLER_HELPERS_H_ 43 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLER_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698