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

Side by Side Diff: chrome/browser/extensions/api/declarative/rules_registry.h

Issue 216513002: Replace DCHECK(BrowserThread::CurrentlyOn) with DCHECK_CURRENTLY_ON in extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_H__ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_H__
6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_H__ 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_H__
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 NEVER_PROCESS, 189 NEVER_PROCESS,
190 // A task to call ProcessChangedRules is scheduled for future execution. 190 // A task to call ProcessChangedRules is scheduled for future execution.
191 SCHEDULED_FOR_PROCESSING, 191 SCHEDULED_FOR_PROCESSING,
192 // No task to call ProcessChangedRules is scheduled yet, but it is possible 192 // No task to call ProcessChangedRules is scheduled yet, but it is possible
193 // to schedule one. 193 // to schedule one.
194 NOT_SCHEDULED_FOR_PROCESSING 194 NOT_SCHEDULED_FOR_PROCESSING
195 }; 195 };
196 typedef std::map<ExtensionId, ProcessChangedRulesState> ProcessStateMap; 196 typedef std::map<ExtensionId, ProcessChangedRulesState> ProcessStateMap;
197 197
198 base::WeakPtr<RulesRegistry> GetWeakPtr() { 198 base::WeakPtr<RulesRegistry> GetWeakPtr() {
199 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 199 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
200 return weak_ptr_factory_.GetWeakPtr(); 200 return weak_ptr_factory_.GetWeakPtr();
201 } 201 }
202 202
203 // Common processing after extension's rules have changed. 203 // Common processing after extension's rules have changed.
204 void ProcessChangedRules(const std::string& extension_id); 204 void ProcessChangedRules(const std::string& extension_id);
205 205
206 // Calls ProcessChangedRules if 206 // Calls ProcessChangedRules if
207 // |process_changed_rules_requested_(extension_id)| == 207 // |process_changed_rules_requested_(extension_id)| ==
208 // NOT_SCHEDULED_FOR_PROCESSING. 208 // NOT_SCHEDULED_FOR_PROCESSING.
209 void MaybeProcessChangedRules(const std::string& extension_id); 209 void MaybeProcessChangedRules(const std::string& extension_id);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 typedef std::map<ExtensionId, std::set<RuleIdentifier> > RuleIdentifiersMap; 285 typedef std::map<ExtensionId, std::set<RuleIdentifier> > RuleIdentifiersMap;
286 RuleIdentifiersMap used_rule_identifiers_; 286 RuleIdentifiersMap used_rule_identifiers_;
287 int last_generated_rule_identifier_id_; 287 int last_generated_rule_identifier_id_;
288 288
289 DISALLOW_COPY_AND_ASSIGN(RulesRegistry); 289 DISALLOW_COPY_AND_ASSIGN(RulesRegistry);
290 }; 290 };
291 291
292 } // namespace extensions 292 } // namespace extensions
293 293
294 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_H__ 294 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698