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

Side by Side Diff: components/url_matcher/url_matcher.cc

Issue 597413004: Instrumenting URLMatcher matchers rebuilding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 6 years, 2 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
« 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/url_matcher/url_matcher.h" 5 #include "components/url_matcher/url_matcher.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/profiler/scoped_profile.h"
11 #include "url/gurl.h" 12 #include "url/gurl.h"
12 #include "url/url_canon.h" 13 #include "url/url_canon.h"
13 14
14 namespace url_matcher { 15 namespace url_matcher {
15 16
16 // This set of classes implement a mapping of URL Component Patterns, such as 17 // This set of classes implement a mapping of URL Component Patterns, such as
17 // host_prefix, host_suffix, host_equals, ..., etc., to StringPatterns 18 // host_prefix, host_suffix, host_equals, ..., etc., to StringPatterns
18 // for use in substring comparisons. 19 // for use in substring comparisons.
19 // 20 //
20 // The idea of this mapping is to reduce the problem of comparing many 21 // The idea of this mapping is to reduce the problem of comparing many
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 query_condition_iter = query_conditions.begin(); 1075 query_condition_iter = query_conditions.begin();
1075 query_condition_iter != query_conditions.end(); 1076 query_condition_iter != query_conditions.end();
1076 ++query_condition_iter) { 1077 ++query_condition_iter) {
1077 used_patterns.insert(query_condition_iter->string_pattern()->id()); 1078 used_patterns.insert(query_condition_iter->string_pattern()->id());
1078 } 1079 }
1079 } 1080 }
1080 condition_factory_.ForgetUnusedPatterns(used_patterns); 1081 condition_factory_.ForgetUnusedPatterns(used_patterns);
1081 } 1082 }
1082 1083
1083 void URLMatcher::UpdateInternalDatastructures() { 1084 void URLMatcher::UpdateInternalDatastructures() {
1085 // TODO(vadimt): Remove ScopedProfile below once crbug.com/417106 is fixed.
1086 tracked_objects::ScopedProfile tracking_profile(
1087 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1088 "URLMatcher_UpdateInternalDatastructures"));
1084 UpdateSubstringSetMatcher(false); 1089 UpdateSubstringSetMatcher(false);
1085 UpdateSubstringSetMatcher(true); 1090 UpdateSubstringSetMatcher(true);
1086 UpdateRegexSetMatcher(); 1091 UpdateRegexSetMatcher();
1087 UpdateTriggers(); 1092 UpdateTriggers();
1088 UpdateConditionFactory(); 1093 UpdateConditionFactory();
1089 } 1094 }
1090 1095
1091 } // namespace url_matcher 1096 } // namespace url_matcher
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