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

Side by Side Diff: gpu/config/gpu_info_collector.cc

Issue 1278973003: Revert of Update SplitString calls to new form (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 | « gpu/config/gpu_control_list.cc ('k') | gpu/config/gpu_info_collector_android.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 "gpu/config/gpu_info_collector.h" 5 #include "gpu/config/gpu_info_collector.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Return a version string in the format of "major.minor". 61 // Return a version string in the format of "major.minor".
62 std::string GetVersionFromString(const std::string& version_string) { 62 std::string GetVersionFromString(const std::string& version_string) {
63 size_t begin = version_string.find_first_of("0123456789"); 63 size_t begin = version_string.find_first_of("0123456789");
64 if (begin != std::string::npos) { 64 if (begin != std::string::npos) {
65 size_t end = version_string.find_first_not_of("01234567890.", begin); 65 size_t end = version_string.find_first_not_of("01234567890.", begin);
66 std::string sub_string; 66 std::string sub_string;
67 if (end != std::string::npos) 67 if (end != std::string::npos)
68 sub_string = version_string.substr(begin, end - begin); 68 sub_string = version_string.substr(begin, end - begin);
69 else 69 else
70 sub_string = version_string.substr(begin); 70 sub_string = version_string.substr(begin);
71 std::vector<std::string> pieces = base::SplitString( 71 std::vector<std::string> pieces;
72 sub_string, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 72 base::SplitString(sub_string, '.', &pieces);
73 if (pieces.size() >= 2) 73 if (pieces.size() >= 2)
74 return pieces[0] + "." + pieces[1]; 74 return pieces[0] + "." + pieces[1];
75 } 75 }
76 return std::string(); 76 return std::string();
77 } 77 }
78 78
79 } // namespace anonymous 79 } // namespace anonymous
80 80
81 namespace gpu { 81 namespace gpu {
82 82
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 basic_gpu_info->video_decode_accelerator_supported_profiles = 166 basic_gpu_info->video_decode_accelerator_supported_profiles =
167 context_gpu_info.video_decode_accelerator_supported_profiles; 167 context_gpu_info.video_decode_accelerator_supported_profiles;
168 basic_gpu_info->video_encode_accelerator_supported_profiles = 168 basic_gpu_info->video_encode_accelerator_supported_profiles =
169 context_gpu_info.video_encode_accelerator_supported_profiles; 169 context_gpu_info.video_encode_accelerator_supported_profiles;
170 basic_gpu_info->jpeg_decode_accelerator_supported = 170 basic_gpu_info->jpeg_decode_accelerator_supported =
171 context_gpu_info.jpeg_decode_accelerator_supported; 171 context_gpu_info.jpeg_decode_accelerator_supported;
172 } 172 }
173 173
174 } // namespace gpu 174 } // namespace gpu
175 175
OLDNEW
« no previous file with comments | « gpu/config/gpu_control_list.cc ('k') | gpu/config/gpu_info_collector_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698