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

Unified Diff: chrome/common/extensions/matcher/url_matcher.h

Issue 10398054: Improve documentation of potential memory leaks in URLMatcherFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/matcher/url_matcher_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/matcher/url_matcher.h
diff --git a/chrome/common/extensions/matcher/url_matcher.h b/chrome/common/extensions/matcher/url_matcher.h
index 4945e8a2d7c23696dd744c05448ae25d41836944..eef01d52a4ceb7a0ad51d986cbe98022dafcc8be 100644
--- a/chrome/common/extensions/matcher/url_matcher.h
+++ b/chrome/common/extensions/matcher/url_matcher.h
@@ -113,6 +113,11 @@ class URLMatcherConditionFactory {
std::string CanonicalizeURLForComponentSearches(const GURL& url);
// Factory methods for various condition types.
+ //
+ // Note that these methods fill the pattern_singletons_. If you create
+ // conditions and don't register them to a URLMatcher, they will continue to
+ // consume memory. You need to call ForgetUnusedPatterns() or
+ // URLMatcher::ClearUnusedConditionSets() in this case.
URLMatcherCondition CreateHostPrefixCondition(const std::string& prefix);
URLMatcherCondition CreateHostSuffixCondition(const std::string& suffix);
URLMatcherCondition CreateHostContainsCondition(const std::string& str);
« no previous file with comments | « no previous file | chrome/common/extensions/matcher/url_matcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698