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

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

Issue 147923005: Split ExtensionSystem interface from ExtensionSystemImpl implementation, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re^3base Created 6 years, 10 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 | Annotate | Revision Log
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 #include "chrome/browser/extensions/extension_warning_badge_service.h" 5 #include "chrome/browser/extensions/extension_warning_badge_service.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/extensions/extension_system.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/global_error/global_error.h" 11 #include "chrome/browser/ui/global_error/global_error.h"
11 #include "chrome/browser/ui/global_error/global_error_service.h" 12 #include "chrome/browser/ui/global_error/global_error_service.h"
12 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 13 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
13 #include "chrome/browser/ui/browser_commands.h" 14 #include "extensions/browser/extension_system.h"
14 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
15 #include "ui/base/l10n/l10n_util.h" 16 #include "ui/base/l10n/l10n_util.h"
16 17
17 namespace extensions { 18 namespace extensions {
18 19
19 namespace { 20 namespace {
20 // Non-modal GlobalError implementation that warns the user if extensions 21 // Non-modal GlobalError implementation that warns the user if extensions
21 // created warnings or errors. If the user clicks on the wrench menu, the user 22 // created warnings or errors. If the user clicks on the wrench menu, the user
22 // is redirected to chrome://extensions to inspect the errors. 23 // is redirected to chrome://extensions to inspect the errors.
23 class ErrorBadge : public GlobalError { 24 class ErrorBadge : public GlobalError {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // Activate or hide the warning badge in case the current state is incorrect. 138 // Activate or hide the warning badge in case the current state is incorrect.
138 if (error && !show) { 139 if (error && !show) {
139 service->RemoveGlobalError(error); 140 service->RemoveGlobalError(error);
140 delete error; 141 delete error;
141 } else if (!error && show) { 142 } else if (!error && show) {
142 service->AddGlobalError(new ErrorBadge(this)); 143 service->AddGlobalError(new ErrorBadge(this));
143 } 144 }
144 } 145 }
145 146
146 } // namespace extensions 147 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_view_host_factory.cc ('k') | chrome/browser/extensions/extension_warning_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698