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

Side by Side Diff: chrome/browser/ui/global_error_service_factory.cc

Issue 7948003: Update error badge on wrench menu button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 9 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 | 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/ui/global_error_service_factory.h" 5 #include "chrome/browser/ui/global_error_service_factory.h"
6 6
7 #include "chrome/browser/profiles/profile_dependency_manager.h" 7 #include "chrome/browser/profiles/profile_dependency_manager.h"
8 #include "chrome/browser/ui/global_error_service.h" 8 #include "chrome/browser/ui/global_error_service.h"
9 9
10 // static 10 // static
11 GlobalErrorService* GlobalErrorServiceFactory::GetForProfile(Profile* profile) { 11 GlobalErrorService* GlobalErrorServiceFactory::GetForProfile(Profile* profile) {
12 return static_cast<GlobalErrorService*>( 12 return static_cast<GlobalErrorService*>(
13 GetInstance()->GetServiceForProfile(profile, true)); 13 GetInstance()->GetServiceForProfile(profile, true));
14 } 14 }
15 15
16 // static 16 // static
17 GlobalErrorServiceFactory* GlobalErrorServiceFactory::GetInstance() { 17 GlobalErrorServiceFactory* GlobalErrorServiceFactory::GetInstance() {
18 return Singleton<GlobalErrorServiceFactory>::get(); 18 return Singleton<GlobalErrorServiceFactory>::get();
19 } 19 }
20 20
21 GlobalErrorServiceFactory::GlobalErrorServiceFactory() 21 GlobalErrorServiceFactory::GlobalErrorServiceFactory()
22 : ProfileKeyedServiceFactory(ProfileDependencyManager::GetInstance()) { 22 : ProfileKeyedServiceFactory(ProfileDependencyManager::GetInstance()) {
23 } 23 }
24 24
25 GlobalErrorServiceFactory::~GlobalErrorServiceFactory() { 25 GlobalErrorServiceFactory::~GlobalErrorServiceFactory() {
26 } 26 }
27 27
28 ProfileKeyedService* GlobalErrorServiceFactory::BuildServiceInstanceFor( 28 ProfileKeyedService* GlobalErrorServiceFactory::BuildServiceInstanceFor(
29 Profile* profile) const { 29 Profile* profile) const {
30 return new GlobalErrorService(); 30 return new GlobalErrorService(profile);
31 } 31 }
32 32
33 bool GlobalErrorServiceFactory::ServiceRedirectedInIncognito() { 33 bool GlobalErrorServiceFactory::ServiceRedirectedInIncognito() {
34 return true; 34 return true;
35 } 35 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/global_error_service.cc ('k') | chrome/browser/ui/global_error_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698