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

Side by Side Diff: chrome/browser/extensions/api/declarative_content/content_condition.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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 #include "chrome/browser/extensions/api/declarative_content/content_condition.h" 5 #include "chrome/browser/extensions/api/declarative_content/content_condition.h"
6 6
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/api/declarative_content/content_constants.h" 9 #include "chrome/browser/extensions/api/declarative_content/content_constants.h"
10 #include "extensions/common/matcher/url_matcher_factory.h" 10 #include "extensions/common/matcher/url_matcher_factory.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 *error = base::StringPrintf(kUnknownConditionAttribute, 122 *error = base::StringPrintf(kUnknownConditionAttribute,
123 condition_attribute_name.c_str()); 123 condition_attribute_name.c_str());
124 } 124 }
125 if (!error->empty()) 125 if (!error->empty())
126 return scoped_ptr<ContentCondition>(NULL); 126 return scoped_ptr<ContentCondition>(NULL);
127 } 127 }
128 128
129 if (!url_matcher_condition_set) { 129 if (!url_matcher_condition_set) {
130 URLMatcherConditionSet::Conditions url_matcher_conditions; 130 URLMatcherConditionSet::Conditions url_matcher_conditions;
131 url_matcher_conditions.insert( 131 url_matcher_conditions.insert(
132 url_matcher_condition_factory->CreateHostPrefixCondition("")); 132 url_matcher_condition_factory->CreateHostPrefixCondition(
133 std::string()));
133 url_matcher_condition_set = 134 url_matcher_condition_set =
134 new URLMatcherConditionSet(++g_next_id, url_matcher_conditions); 135 new URLMatcherConditionSet(++g_next_id, url_matcher_conditions);
135 } 136 }
136 return scoped_ptr<ContentCondition>( 137 return scoped_ptr<ContentCondition>(
137 new ContentCondition(url_matcher_condition_set, css_rules)); 138 new ContentCondition(url_matcher_condition_set, css_rules));
138 } 139 }
139 140
140 } // namespace extensions 141 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698