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

Side by Side Diff: webkit/glue/dom_operations.cc

Issue 5004002: base: Move StringSplitAlongWhitespace to string_split.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unittests Created 10 years, 1 month 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
« no previous file with comments | « net/tools/hresolv/hresolv.cc ('k') | 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/glue/dom_operations.h" 5 #include "webkit/glue/dom_operations.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 WebApplicationInfo::WebApplicationInfo() {} 272 WebApplicationInfo::WebApplicationInfo() {}
273 273
274 WebApplicationInfo::~WebApplicationInfo() {} 274 WebApplicationInfo::~WebApplicationInfo() {}
275 275
276 bool ParseIconSizes(const string16& text, 276 bool ParseIconSizes(const string16& text,
277 std::vector<gfx::Size>* sizes, 277 std::vector<gfx::Size>* sizes,
278 bool* is_any) { 278 bool* is_any) {
279 *is_any = false; 279 *is_any = false;
280 std::vector<string16> size_strings; 280 std::vector<string16> size_strings;
281 SplitStringAlongWhitespace(text, &size_strings); 281 base::SplitStringAlongWhitespace(text, &size_strings);
282 for (size_t i = 0; i < size_strings.size(); ++i) { 282 for (size_t i = 0; i < size_strings.size(); ++i) {
283 if (EqualsASCII(size_strings[i], "any")) { 283 if (EqualsASCII(size_strings[i], "any")) {
284 *is_any = true; 284 *is_any = true;
285 } else { 285 } else {
286 gfx::Size size = ParseIconSize(size_strings[i]); 286 gfx::Size size = ParseIconSize(size_strings[i]);
287 if (size.width() <= 0 || size.height() <= 0) 287 if (size.width() <= 0 || size.height() <= 0)
288 return false; // Bogus size. 288 return false; // Bogus size.
289 sizes->push_back(size); 289 sizes->push_back(size);
290 } 290 }
291 } 291 }
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 if (!element.hasTagName("meta")) 461 if (!element.hasTagName("meta"))
462 continue; 462 continue;
463 WebString value = element.getAttribute(attribute_name); 463 WebString value = element.getAttribute(attribute_name);
464 if (value.isNull() || value != attribute_value) 464 if (value.isNull() || value != attribute_value)
465 continue; 465 continue;
466 meta_elements->push_back(element); 466 meta_elements->push_back(element);
467 } 467 }
468 } 468 }
469 469
470 } // webkit_glue 470 } // webkit_glue
OLDNEW
« no previous file with comments | « net/tools/hresolv/hresolv.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698