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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 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
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/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/extensions/api/declarative/initializing_rules_registry. h" 9 #include "chrome/browser/extensions/api/declarative/initializing_rules_registry. h"
10 #include "chrome/browser/extensions/api/declarative/rules_registry_storage_deleg ate.h" 10 #include "chrome/browser/extensions/api/declarative/rules_registry_storage_deleg ate.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 RulesRegistryService::~RulesRegistryService() { 51 RulesRegistryService::~RulesRegistryService() {
52 for (size_t i = 0; i < delegates_.size(); ++i) 52 for (size_t i = 0; i < delegates_.size(); ++i)
53 delegates_[i]->CleanupOnUIThread(); 53 delegates_[i]->CleanupOnUIThread();
54 } 54 }
55 55
56 void RulesRegistryService::RegisterDefaultRulesRegistries() { 56 void RulesRegistryService::RegisterDefaultRulesRegistries() {
57 RulesRegistryStorageDelegate* delegate = new RulesRegistryStorageDelegate(); 57 RulesRegistryStorageDelegate* delegate = new RulesRegistryStorageDelegate();
58 scoped_refptr<WebRequestRulesRegistry> web_request_rules_registry( 58 scoped_refptr<WebRequestRulesRegistry> web_request_rules_registry(
59 new WebRequestRulesRegistry(profile_, delegate)); 59 new WebRequestRulesRegistry(profile_, delegate));
60 delegate->InitOnUIThread(profile_, web_request_rules_registry, 60 delegate->InitOnUIThread(profile_, web_request_rules_registry.get(),
61 GetDeclarativeRuleStorageKey( 61 GetDeclarativeRuleStorageKey(
62 declarative_webrequest_constants::kOnRequest, 62 declarative_webrequest_constants::kOnRequest,
63 profile_->IsOffTheRecord())); 63 profile_->IsOffTheRecord()));
64 delegates_.push_back(delegate); 64 delegates_.push_back(delegate);
65 65
66 RegisterRulesRegistry(declarative_webrequest_constants::kOnRequest, 66 RegisterRulesRegistry(declarative_webrequest_constants::kOnRequest,
67 web_request_rules_registry); 67 web_request_rules_registry);
68 content::BrowserThread::PostTask( 68 content::BrowserThread::PostTask(
69 content::BrowserThread::IO, FROM_HERE, 69 content::BrowserThread::IO, FROM_HERE,
70 base::Bind(&RegisterToExtensionWebRequestEventRouterOnIO, 70 base::Bind(&RegisterToExtensionWebRequestEventRouterOnIO,
71 profile_, web_request_rules_registry)); 71 profile_, web_request_rules_registry));
72 } 72 }
73 73
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 OnExtensionUnloaded(extension->id()); 126 OnExtensionUnloaded(extension->id());
127 break; 127 break;
128 } 128 }
129 default: 129 default:
130 NOTREACHED(); 130 NOTREACHED();
131 break; 131 break;
132 } 132 }
133 } 133 }
134 134
135 } // namespace extensions 135 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698