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

Side by Side Diff: webrtc/system_wrappers/source/file_impl.cc

Issue 2969623003: Update includes for webrtc/{base => rtc_base} rename (2/3) (Closed)
Patch Set: Rebased onto 224e65939af87443addfc5bb500fbf434728bd1c and restored sorting in clock.cc Created 3 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/system_wrappers/include/file_wrapper.h" 11 #include "webrtc/system_wrappers/include/file_wrapper.h"
12 12
13 #ifdef _WIN32 13 #ifdef _WIN32
14 #include <Windows.h> 14 #include <Windows.h>
15 #else 15 #else
16 #include <stdarg.h> 16 #include <stdarg.h>
17 #include <string.h> 17 #include <string.h>
18 #endif 18 #endif
19 19
20 #include "webrtc/base/checks.h" 20 #include "webrtc/rtc_base/checks.h"
21 21
22 namespace webrtc { 22 namespace webrtc {
23 namespace { 23 namespace {
24 FILE* FileOpen(const char* file_name_utf8, bool read_only) { 24 FILE* FileOpen(const char* file_name_utf8, bool read_only) {
25 #if defined(_WIN32) 25 #if defined(_WIN32)
26 int len = MultiByteToWideChar(CP_UTF8, 0, file_name_utf8, -1, nullptr, 0); 26 int len = MultiByteToWideChar(CP_UTF8, 0, file_name_utf8, -1, nullptr, 0);
27 std::wstring wstr(len, 0); 27 std::wstring wstr(len, 0);
28 MultiByteToWideChar(CP_UTF8, 0, file_name_utf8, -1, &wstr[0], len); 28 MultiByteToWideChar(CP_UTF8, 0, file_name_utf8, -1, &wstr[0], len);
29 FILE* file = _wfopen(wstr.c_str(), read_only ? L"rb" : L"wb"); 29 FILE* file = _wfopen(wstr.c_str(), read_only ? L"rb" : L"wb");
30 #else 30 #else
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 if (file_ != nullptr) 143 if (file_ != nullptr)
144 fclose(file_); 144 fclose(file_);
145 file_ = nullptr; 145 file_ = nullptr;
146 } 146 }
147 147
148 int FileWrapper::FlushImpl() { 148 int FileWrapper::FlushImpl() {
149 return (file_ != nullptr) ? fflush(file_) : -1; 149 return (file_ != nullptr) ? fflush(file_) : -1;
150 } 150 }
151 151
152 } // namespace webrtc 152 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/source/event_timer_posix_unittest.cc ('k') | webrtc/system_wrappers/source/logcat_trace_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698