OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |