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

Side by Side Diff: chrome/browser/extensions/api/declarative/rules_registry_service.cc

Issue 16094012: Fix unitialized pointer in RulesRegistryService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/api/declarative/rules_registry_service.h" 5 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 15 matching lines...) Expand all
26 void RegisterToExtensionWebRequestEventRouterOnIO( 26 void RegisterToExtensionWebRequestEventRouterOnIO(
27 void* profile, 27 void* profile,
28 scoped_refptr<WebRequestRulesRegistry> web_request_rules_registry) { 28 scoped_refptr<WebRequestRulesRegistry> web_request_rules_registry) {
29 ExtensionWebRequestEventRouter::GetInstance()->RegisterRulesRegistry( 29 ExtensionWebRequestEventRouter::GetInstance()->RegisterRulesRegistry(
30 profile, web_request_rules_registry); 30 profile, web_request_rules_registry);
31 } 31 }
32 32
33 } // namespace 33 } // namespace
34 34
35 RulesRegistryService::RulesRegistryService(Profile* profile) 35 RulesRegistryService::RulesRegistryService(Profile* profile)
36 : profile_(profile) { 36 : content_rules_registry_(NULL),
37 profile_(profile) {
37 if (profile) { 38 if (profile) {
38 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 39 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
39 content::Source<Profile>(profile->GetOriginalProfile())); 40 content::Source<Profile>(profile->GetOriginalProfile()));
40 RegisterDefaultRulesRegistries(); 41 RegisterDefaultRulesRegistries();
41 } 42 }
42 } 43 }
43 44
44 RulesRegistryService::~RulesRegistryService() {} 45 RulesRegistryService::~RulesRegistryService() {}
45 46
46 void RulesRegistryService::RegisterDefaultRulesRegistries() { 47 void RulesRegistryService::RegisterDefaultRulesRegistries() {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 OnExtensionUnloaded(extension->id()); 136 OnExtensionUnloaded(extension->id());
136 break; 137 break;
137 } 138 }
138 default: 139 default:
139 NOTREACHED(); 140 NOTREACHED();
140 break; 141 break;
141 } 142 }
142 } 143 }
143 144
144 } // namespace extensions 145 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698