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

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

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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
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_factory.h" 5 #include "components/url_matcher/url_matcher_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cctype> 8 #include <cctype>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 typedef URLMatcherCondition 91 typedef URLMatcherCondition
92 (URLMatcherConditionFactory::* FactoryMethod) 92 (URLMatcherConditionFactory::* FactoryMethod)
93 (const std::string& prefix); 93 (const std::string& prefix);
94 typedef std::map<std::string, FactoryMethod> FactoryMethods; 94 typedef std::map<std::string, FactoryMethod> FactoryMethods;
95 95
96 FactoryMethods factory_methods_; 96 FactoryMethods factory_methods_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(URLMatcherConditionFactoryMethods); 98 DISALLOW_COPY_AND_ASSIGN(URLMatcherConditionFactoryMethods);
99 }; 99 };
100 100
101 static base::LazyInstance<URLMatcherConditionFactoryMethods> 101 static base::LazyInstance<URLMatcherConditionFactoryMethods>::DestructorAtExit
102 g_url_matcher_condition_factory_methods = LAZY_INSTANCE_INITIALIZER; 102 g_url_matcher_condition_factory_methods = LAZY_INSTANCE_INITIALIZER;
103 103
104 } // namespace 104 } // namespace
105 105
106 // static 106 // static
107 scoped_refptr<URLMatcherConditionSet> 107 scoped_refptr<URLMatcherConditionSet>
108 URLMatcherFactory::CreateFromURLFilterDictionary( 108 URLMatcherFactory::CreateFromURLFilterDictionary(
109 URLMatcherConditionFactory* url_matcher_condition_factory, 109 URLMatcherConditionFactory* url_matcher_condition_factory,
110 const base::DictionaryValue* url_filter_dict, 110 const base::DictionaryValue* url_filter_dict,
111 URLMatcherConditionSet::ID id, 111 URLMatcherConditionSet::ID id,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 } else { 265 } else {
266 *error = kInvalidPortRanges; 266 *error = kInvalidPortRanges;
267 return nullptr; 267 return nullptr;
268 } 268 }
269 } 269 }
270 270
271 return base::MakeUnique<URLMatcherPortFilter>(ranges); 271 return base::MakeUnique<URLMatcherPortFilter>(ranges);
272 } 272 }
273 273
274 } // namespace url_matcher 274 } // namespace url_matcher
OLDNEW
« no previous file with comments | « components/sync/model_impl/model_type_store_backend.cc ('k') | content/app/android/child_process_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698