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

Side by Side Diff: content/gpu/gpu_info_collector_win.cc

Issue 12208057: Add explicit base to FilePath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « content/gpu/gpu_info_collector_linux.cc ('k') | content/plugin/plugin_channel.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/gpu/gpu_info_collector.h" 5 #include "content/gpu/gpu_info_collector.h"
6 6
7 // This has to be included before windows.h. 7 // This has to be included before windows.h.
8 #include "third_party/re2/re2/re2.h" 8 #include "third_party/re2/re2/re2.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 L"%WinDir%\\Performance\\WinSAT\\DataStore\\", 55 L"%WinDir%\\Performance\\WinSAT\\DataStore\\",
56 winsat_results_path, MAX_PATH); 56 winsat_results_path, MAX_PATH);
57 if (size == 0 || size > MAX_PATH) { 57 if (size == 0 || size > MAX_PATH) {
58 LOG(ERROR) << "The path to the WinSAT results is too long: " 58 LOG(ERROR) << "The path to the WinSAT results is too long: "
59 << size << " chars."; 59 << size << " chars.";
60 return stats; 60 return stats;
61 } 61 }
62 62
63 // Find most recent formal assessment results. 63 // Find most recent formal assessment results.
64 file_util::FileEnumerator file_enumerator( 64 file_util::FileEnumerator file_enumerator(
65 FilePath(winsat_results_path), 65 base::FilePath(winsat_results_path),
66 false, // not recursive 66 false, // not recursive
67 file_util::FileEnumerator::FILES, 67 file_util::FileEnumerator::FILES,
68 FILE_PATH_LITERAL("* * Formal.Assessment (*).WinSAT.xml")); 68 FILE_PATH_LITERAL("* * Formal.Assessment (*).WinSAT.xml"));
69 69
70 FilePath current_results; 70 base::FilePath current_results;
71 for (FilePath results = file_enumerator.Next(); !results.empty(); 71 for (base::FilePath results = file_enumerator.Next(); !results.empty();
72 results = file_enumerator.Next()) { 72 results = file_enumerator.Next()) {
73 // The filenames start with the date and time as yyyy-mm-dd hh.mm.ss.xxx, 73 // The filenames start with the date and time as yyyy-mm-dd hh.mm.ss.xxx,
74 // so the greatest file lexicographically is also the most recent file. 74 // so the greatest file lexicographically is also the most recent file.
75 if (FilePath::CompareLessIgnoreCase(current_results.value(), 75 if (base::FilePath::CompareLessIgnoreCase(current_results.value(),
76 results.value())) 76 results.value()))
77 current_results = results; 77 current_results = results;
78 } 78 }
79 79
80 std::string current_results_string = current_results.MaybeAsASCII(); 80 std::string current_results_string = current_results.MaybeAsASCII();
81 if (current_results_string.empty()) { 81 if (current_results_string.empty()) {
82 LOG(ERROR) << "Can't retrieve a valid WinSAT assessment."; 82 LOG(ERROR) << "Can't retrieve a valid WinSAT assessment.";
83 return stats; 83 return stats;
84 } 84 }
85 85
86 // Get relevant scores from results file. XML schema at: 86 // Get relevant scores from results file. XML schema at:
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 basic_gpu_info->software_rendering = true; 357 basic_gpu_info->software_rendering = true;
358 return; 358 return;
359 } 359 }
360 360
361 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); 361 MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
362 362
363 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; 363 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics;
364 } 364 }
365 365
366 } // namespace gpu_info_collector 366 } // namespace gpu_info_collector
OLDNEW
« no previous file with comments | « content/gpu/gpu_info_collector_linux.cc ('k') | content/plugin/plugin_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698