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

Side by Side Diff: media/base/test_data_util.h

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android Created 4 years, 8 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 | « media/base/stream_parser_buffer.cc ('k') | media/base/test_helpers.h » ('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 #ifndef MEDIA_BASE_TEST_DATA_UTIL_H_ 5 #ifndef MEDIA_BASE_TEST_DATA_UTIL_H_
6 #define MEDIA_BASE_TEST_DATA_UTIL_H_ 6 #define MEDIA_BASE_TEST_DATA_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/strings/string_split.h" 14 #include "base/strings/string_split.h"
16 15
17 namespace media { 16 namespace media {
18 17
19 class DecoderBuffer; 18 class DecoderBuffer;
20 19
21 // Returns a file path for a file in the media/test/data directory. 20 // Returns a file path for a file in the media/test/data directory.
22 base::FilePath GetTestDataFilePath(const std::string& name); 21 base::FilePath GetTestDataFilePath(const std::string& name);
23 22
24 // Returns relative path for test data folder: media/test/data. 23 // Returns relative path for test data folder: media/test/data.
25 base::FilePath GetTestDataPath(); 24 base::FilePath GetTestDataPath();
26 25
27 // Returns a string containing key value query params in the form of: 26 // Returns a string containing key value query params in the form of:
28 // "key_1=value_1&key_2=value2" 27 // "key_1=value_1&key_2=value2"
29 std::string GetURLQueryString(const base::StringPairs& query_params); 28 std::string GetURLQueryString(const base::StringPairs& query_params);
30 29
31 // Reads a test file from media/test/data directory and stores it in 30 // Reads a test file from media/test/data directory and stores it in
32 // a DecoderBuffer. Use DecoderBuffer vs DataBuffer to ensure no matter 31 // a DecoderBuffer. Use DecoderBuffer vs DataBuffer to ensure no matter
33 // what a test does, it's safe to use FFmpeg methods. 32 // what a test does, it's safe to use FFmpeg methods.
34 // 33 //
35 // |name| - The name of the file. 34 // |name| - The name of the file.
36 // |buffer| - The contents of the file. 35 // |buffer| - The contents of the file.
37 scoped_refptr<DecoderBuffer> ReadTestDataFile(const std::string& name); 36 scoped_refptr<DecoderBuffer> ReadTestDataFile(const std::string& name);
38 37
39 } // namespace media 38 } // namespace media
40 39
41 #endif // MEDIA_BASE_TEST_DATA_UTIL_H_ 40 #endif // MEDIA_BASE_TEST_DATA_UTIL_H_
OLDNEW
« no previous file with comments | « media/base/stream_parser_buffer.cc ('k') | media/base/test_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698