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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 1284833004: Remove remaining legacy SplitString calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « components/upload_list/upload_list.cc ('k') | device/hid/hid_service_linux.cc » ('j') | 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) 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 "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 mojo::StrongBinding<EmbeddedWorkerSetup> binding_; 417 mojo::StrongBinding<EmbeddedWorkerSetup> binding_;
418 }; 418 };
419 419
420 void CreateEmbeddedWorkerSetup( 420 void CreateEmbeddedWorkerSetup(
421 mojo::InterfaceRequest<EmbeddedWorkerSetup> request) { 421 mojo::InterfaceRequest<EmbeddedWorkerSetup> request) {
422 new EmbeddedWorkerSetupImpl(request.Pass()); 422 new EmbeddedWorkerSetupImpl(request.Pass());
423 } 423 }
424 424
425 void StringToUintVector(const std::string& str, std::vector<unsigned>* vector) { 425 void StringToUintVector(const std::string& str, std::vector<unsigned>* vector) {
426 DCHECK(vector->empty()); 426 DCHECK(vector->empty());
427 std::vector<std::string> pieces; 427 std::vector<std::string> pieces = base::SplitString(
428 base::SplitString(str, ',', &pieces); 428 str, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
429 DCHECK_EQ(pieces.size(), static_cast<size_t>(gfx::BufferFormat::LAST) + 1); 429 DCHECK_EQ(pieces.size(), static_cast<size_t>(gfx::BufferFormat::LAST) + 1);
430 for (size_t i = 0; i < pieces.size(); ++i) { 430 for (size_t i = 0; i < pieces.size(); ++i) {
431 unsigned number = 0; 431 unsigned number = 0;
432 bool succeed = base::StringToUint(pieces[i], &number); 432 bool succeed = base::StringToUint(pieces[i], &number);
433 DCHECK(succeed); 433 DCHECK(succeed);
434 vector->push_back(number); 434 vector->push_back(number);
435 } 435 }
436 } 436 }
437 437
438 } // namespace 438 } // namespace
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 } 1950 }
1951 1951
1952 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1952 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
1953 size_t erased = 1953 size_t erased =
1954 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1954 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
1955 routing_id_); 1955 routing_id_);
1956 DCHECK_EQ(1u, erased); 1956 DCHECK_EQ(1u, erased);
1957 } 1957 }
1958 1958
1959 } // namespace content 1959 } // namespace content
OLDNEW
« no previous file with comments | « components/upload_list/upload_list.cc ('k') | device/hid/hid_service_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698