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

Side by Side Diff: chrome/browser/extensions/extension_warning_set.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/extensions/extension_warning_set.h" 5 #include "chrome/browser/extensions/extension_warning_set.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/extensions/extension_global_error_badge.h" 8 #include "chrome/browser/extensions/extension_global_error_badge.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/profiles/profile_manager.h" 11 #include "chrome/browser/profiles/profile_manager.h"
12 #include "chrome/browser/ui/global_error_service.h" 12 #include "chrome/browser/ui/global_error_service.h"
13 #include "chrome/browser/ui/global_error_service_factory.h" 13 #include "chrome/browser/ui/global_error_service_factory.h"
14 #include "chrome/common/chrome_notification_types.h" 14 #include "chrome/common/chrome_notification_types.h"
15 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
16 #include "content/public/browser/notification_service.h" 16 #include "content/public/browser/notification_service.h"
17 #include "grit/chromium_strings.h" 17 #include "grit/chromium_strings.h"
18 #include "grit/generated_resources.h" 18 #include "grit/generated_resources.h"
19 #include "ui/base/l10n/l10n_util.h" 19 #include "ui/base/l10n/l10n_util.h"
20 20
21 using content::BrowserThread;
22
21 // This class is used to represent warnings if extensions misbehave. 23 // This class is used to represent warnings if extensions misbehave.
22 class ExtensionWarning { 24 class ExtensionWarning {
23 public: 25 public:
24 // Default constructor for storing ExtensionServiceWarning in STL containers 26 // Default constructor for storing ExtensionServiceWarning in STL containers
25 // do not use. 27 // do not use.
26 ExtensionWarning(); 28 ExtensionWarning();
27 29
28 // Constructs a warning of type |type| for extension |extension_id|. This 30 // Constructs a warning of type |type| for extension |extension_id|. This
29 // could be for example the fact that an extension conflicted with others. 31 // could be for example the fact that an extension conflicted with others.
30 ExtensionWarning(ExtensionWarningSet::WarningType type, 32 ExtensionWarning(ExtensionWarningSet::WarningType type,
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 break; 192 break;
191 } 193 }
192 } 194 }
193 195
194 // Activate or hide the warning badge in case the current state is incorrect. 196 // Activate or hide the warning badge in case the current state is incorrect.
195 if (extension_global_error_badge_ && !need_warning_badge) 197 if (extension_global_error_badge_ && !need_warning_badge)
196 DeactivateBadge(); 198 DeactivateBadge();
197 else if (!extension_global_error_badge_ && need_warning_badge) 199 else if (!extension_global_error_badge_ && need_warning_badge)
198 ActivateBadge(); 200 ActivateBadge();
199 } 201 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_updater_unittest.cc ('k') | chrome/browser/extensions/extension_webrequest_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698