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

Side by Side Diff: extensions/browser/extension_warning_set.h

Issue 503033002: Move ExtensionWarningService and ExtensionsWarningSet to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@3_web_view_internal
Patch Set: Created 6 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BROWSER_EXTENSIONS_EXTENSION_WARNING_SET_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_WARNING_SET_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_SET_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_WARNING_SET_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 // TODO(battre) Remove the Extension prefix. 14 // TODO(battre) Remove the Extension prefix.
15 15
16 namespace base { 16 namespace base {
17 class FilePath; 17 class FilePath;
18 } 18 }
19 19
20 namespace extensions { 20 namespace extensions {
21 21
22 class ExtensionSet; 22 class ExtensionSet;
23 23
24 // This class is used by the ExtensionWarningService to represent warnings if 24 // This class is used by the ExtensionWarningService to represent warnings if
25 // extensions misbehave. Note that the ExtensionWarningService deals only with 25 // extensions misbehave. Note that the ExtensionWarningService deals only with
26 // specific warnings that should trigger a badge on the Chrome menu button. 26 // specific warnings that should trigger a badge on the Chrome menu button.
27 class ExtensionWarning { 27 class ExtensionWarning {
James Cook 2014/08/25 20:58:12 It would be a little weird to have a class named j
Fady Samuel 2014/08/25 21:15:38 +1 to extensions::WarningSet.
Xi Han 2014/08/26 18:21:40 Since an ExtensionWarningSet is defined at the end
28 public: 28 public:
29 enum WarningType { 29 enum WarningType {
30 // Don't use this, it is only intended for the default constructor and 30 // Don't use this, it is only intended for the default constructor and
31 // does not have localized warning messages for the UI. 31 // does not have localized warning messages for the UI.
32 kInvalid = 0, 32 kInvalid = 0,
33 // An extension caused excessive network delays. 33 // An extension caused excessive network delays.
34 kNetworkDelay, 34 kNetworkDelay,
35 // This extension failed to modify a network request because the 35 // This extension failed to modify a network request because the
36 // modification conflicted with a modification of another extension. 36 // modification conflicted with a modification of another extension.
37 kNetworkConflict, 37 kNetworkConflict,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 // Compare ExtensionWarnings based on the tuple of (extension_id, type). 115 // Compare ExtensionWarnings based on the tuple of (extension_id, type).
116 // The message associated with ExtensionWarnings is purely informational 116 // The message associated with ExtensionWarnings is purely informational
117 // and does not contribute to distinguishing extensions. 117 // and does not contribute to distinguishing extensions.
118 bool operator<(const ExtensionWarning& a, const ExtensionWarning& b); 118 bool operator<(const ExtensionWarning& a, const ExtensionWarning& b);
119 119
120 typedef std::set<ExtensionWarning> ExtensionWarningSet; 120 typedef std::set<ExtensionWarning> ExtensionWarningSet;
121 121
122 } // namespace extensions 122 } // namespace extensions
123 123
124 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_SET_H_ 124 #endif // EXTENSIONS_BROWSER_EXTENSION_WARNING_SET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698