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

Side by Side Diff: content/common/gpu/media/vaapi_h264_decoder_unittest.cc

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <string> 5 #include <string>
6 6
7 // This has to be included first. 7 // This has to be included first.
8 // See http://code.google.com/p/googletest/issues/detail?id=371 8 // See http://code.google.com/p/googletest/issues/detail?id=371
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return false; 143 return false;
144 } 144 }
145 145
146 const int input_id = 0; // We don't use input_id in this class. 146 const int input_id = 0; // We don't use input_id in this class.
147 decoder_->SetStream( 147 decoder_->SetStream(
148 reinterpret_cast<const uint8*>(data_.c_str()), data_.size(), input_id); 148 reinterpret_cast<const uint8*>(data_.c_str()), data_.size(), input_id);
149 149
150 // This creates or truncates output_file. 150 // This creates or truncates output_file.
151 // Without it, AppendToFile() will not work. 151 // Without it, AppendToFile() will not work.
152 if (!output_file.empty()) { 152 if (!output_file.empty()) {
153 if (file_util::WriteFile(output_file, NULL, 0) != 0) { 153 if (base::WriteFile(output_file, NULL, 0) != 0) {
154 return false; 154 return false;
155 } 155 }
156 output_file_ = output_file; 156 output_file_ = output_file;
157 } 157 }
158 158
159 return true; 159 return true;
160 } 160 }
161 161
162 bool VaapiH264DecoderLoop::Run() { 162 bool VaapiH264DecoderLoop::Run() {
163 while (1) { 163 while (1) {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 content::g_md5sum = it->second; 378 content::g_md5sum = it->second;
379 continue; 379 continue;
380 } 380 }
381 if (it->first == "v" || it->first == "vmodule") 381 if (it->first == "v" || it->first == "vmodule")
382 continue; 382 continue;
383 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; 383 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second;
384 } 384 }
385 385
386 return RUN_ALL_TESTS(); 386 return RUN_ALL_TESTS();
387 } 387 }
OLDNEW
« no previous file with comments | « content/browser/storage_partition_impl_unittest.cc ('k') | content/common/gpu/media/video_decode_accelerator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698