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

Side by Side Diff: media/base/android/webaudio_media_codec_bridge.cc

Issue 543553002: [Checkstyle] Enable additional name checks for Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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 // 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 "media/base/android/webaudio_media_codec_bridge.h" 5 #include "media/base/android/webaudio_media_codec_bridge.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 } 54 }
55 55
56 int WebAudioMediaCodecBridge::SaveEncodedAudioToFile( 56 int WebAudioMediaCodecBridge::SaveEncodedAudioToFile(
57 JNIEnv* env, 57 JNIEnv* env,
58 jobject context) { 58 jobject context) {
59 // Create a temporary file where we can save the encoded audio data. 59 // Create a temporary file where we can save the encoded audio data.
60 std::string temporaryFile = 60 std::string temporaryFile =
61 base::android::ConvertJavaStringToUTF8( 61 base::android::ConvertJavaStringToUTF8(
62 env, 62 env,
63 Java_WebAudioMediaCodecBridge_CreateTempFile(env, context).obj()); 63 Java_WebAudioMediaCodecBridge_createTempFile(env, context).obj());
64 64
65 // Open the file and unlink it, so that it will be actually removed 65 // Open the file and unlink it, so that it will be actually removed
66 // when we close the file. 66 // when we close the file.
67 int fd = open(temporaryFile.c_str(), O_RDWR); 67 int fd = open(temporaryFile.c_str(), O_RDWR);
68 if (unlink(temporaryFile.c_str())) { 68 if (unlink(temporaryFile.c_str())) {
69 VLOG(0) << "Couldn't unlink temp file " << temporaryFile 69 VLOG(0) << "Couldn't unlink temp file " << temporaryFile
70 << ": " << strerror(errno); 70 << ": " << strerror(errno);
71 } 71 }
72 72
73 if (fd < 0) { 73 if (fd < 0) {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 count -= bytes_written; 190 count -= bytes_written;
191 buffer += bytes_written; 191 buffer += bytes_written;
192 } 192 }
193 } 193 }
194 194
195 bool WebAudioMediaCodecBridge::RegisterWebAudioMediaCodecBridge(JNIEnv* env) { 195 bool WebAudioMediaCodecBridge::RegisterWebAudioMediaCodecBridge(JNIEnv* env) {
196 return RegisterNativesImpl(env); 196 return RegisterNativesImpl(env);
197 } 197 }
198 198
199 } // namespace 199 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698