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

Side by Side Diff: media/audio/win/audio_unified_win_unittest.cc

Issue 12217101: Replace FilePath with base::FilePath in some more top level directories. (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 | « media/audio/win/audio_manager_win.cc ('k') | media/base/media_posix.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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 class UnifiedSourceCallback : public AudioOutputStream::AudioSourceCallback { 62 class UnifiedSourceCallback : public AudioOutputStream::AudioSourceCallback {
63 public: 63 public:
64 explicit UnifiedSourceCallback() 64 explicit UnifiedSourceCallback()
65 : previous_call_time_(base::Time::Now()), 65 : previous_call_time_(base::Time::Now()),
66 text_file_(NULL), 66 text_file_(NULL),
67 elements_to_write_(0) { 67 elements_to_write_(0) {
68 delta_times_.reset(new int[kMaxDeltaSamples]); 68 delta_times_.reset(new int[kMaxDeltaSamples]);
69 } 69 }
70 70
71 virtual ~UnifiedSourceCallback() { 71 virtual ~UnifiedSourceCallback() {
72 FilePath file_name; 72 base::FilePath file_name;
73 EXPECT_TRUE(PathService::Get(base::DIR_EXE, &file_name)); 73 EXPECT_TRUE(PathService::Get(base::DIR_EXE, &file_name));
74 file_name = file_name.AppendASCII(kDeltaTimeMsFileName); 74 file_name = file_name.AppendASCII(kDeltaTimeMsFileName);
75 75
76 EXPECT_TRUE(!text_file_); 76 EXPECT_TRUE(!text_file_);
77 text_file_ = file_util::OpenFile(file_name, "wt"); 77 text_file_ = file_util::OpenFile(file_name, "wt");
78 DLOG_IF(ERROR, !text_file_) << "Failed to open log file."; 78 DLOG_IF(ERROR, !text_file_) << "Failed to open log file.";
79 LOG(INFO) << ">> Output file " << file_name.value() << " has been created."; 79 LOG(INFO) << ">> Output file " << file_name.value() << " has been created.";
80 80
81 // Write the array which contains delta times to a text file. 81 // Write the array which contains delta times to a text file.
82 size_t elements_written = 0; 82 size_t elements_written = 0;
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 EXPECT_TRUE(wus->Open()); 280 EXPECT_TRUE(wus->Open());
281 wus->Start(&source); 281 wus->Start(&source);
282 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), 282 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(),
283 base::TimeDelta::FromMilliseconds(10000)); 283 base::TimeDelta::FromMilliseconds(10000));
284 loop.Run(); 284 loop.Run();
285 wus->Close(); 285 wus->Close();
286 } 286 }
287 287
288 } // namespace media 288 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/win/audio_manager_win.cc ('k') | media/base/media_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698