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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.cc

Issue 1345433002: Add RTC_ prefix to contructormagic macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Formatting fix. Created 5 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 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 return false; 87 return false;
88 } 88 }
89 } 89 }
90 return fail_to_read_response_; 90 return fail_to_read_response_;
91 } 91 }
92 92
93 private: 93 private:
94 rtc::scoped_ptr<ResourceFileReader> reader_; 94 rtc::scoped_ptr<ResourceFileReader> reader_;
95 bool fail_to_read_response_; 95 bool fail_to_read_response_;
96 96
97 DISALLOW_IMPLICIT_CONSTRUCTORS(BaseLineFileVerify); 97 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BaseLineFileVerify);
98 }; 98 };
99 99
100 class BaseLineFileUpdate : public BaseLineFileInterface { 100 class BaseLineFileUpdate : public BaseLineFileInterface {
101 public: 101 public:
102 BaseLineFileUpdate(const std::string& filepath, 102 BaseLineFileUpdate(const std::string& filepath,
103 BaseLineFileInterface* verifier) 103 BaseLineFileInterface* verifier)
104 : verifier_(verifier), 104 : verifier_(verifier),
105 output_content_(), 105 output_content_(),
106 filepath_(filepath) { 106 filepath_(filepath) {
107 output_content_.push_back(kMagicMarker); 107 output_content_.push_back(kMagicMarker);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 139 }
140 printf("NOTE: No change, not writing: %s\n", filepath_.c_str()); 140 printf("NOTE: No change, not writing: %s\n", filepath_.c_str());
141 return true; 141 return true;
142 } 142 }
143 143
144 private: 144 private:
145 rtc::scoped_ptr<BaseLineFileInterface> verifier_; 145 rtc::scoped_ptr<BaseLineFileInterface> verifier_;
146 std::vector<uint32_t> output_content_; 146 std::vector<uint32_t> output_content_;
147 std::string filepath_; 147 std::string filepath_;
148 148
149 DISALLOW_IMPLICIT_CONSTRUCTORS(BaseLineFileUpdate); 149 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BaseLineFileUpdate);
150 }; 150 };
151 151
152 BaseLineFileInterface* BaseLineFileInterface::Create( 152 BaseLineFileInterface* BaseLineFileInterface::Create(
153 const std::string& filename, bool write_output_file) { 153 const std::string& filename, bool write_output_file) {
154 std::string filepath = filename; 154 std::string filepath = filename;
155 std::replace(filepath.begin(), filepath.end(), '/', '_'); 155 std::replace(filepath.begin(), filepath.end(), '/', '_');
156 filepath = std::string(kResourceSubDir) + "/" + filepath; 156 filepath = std::string(kResourceSubDir) + "/" + filepath;
157 157
158 rtc::scoped_ptr<BaseLineFileInterface> result; 158 rtc::scoped_ptr<BaseLineFileInterface> result;
159 result.reset(new BaseLineFileVerify(filepath, !write_output_file)); 159 result.reset(new BaseLineFileVerify(filepath, !write_output_file));
160 if (write_output_file) { 160 if (write_output_file) {
161 // Takes ownership of the |verifier| instance. 161 // Takes ownership of the |verifier| instance.
162 result.reset(new BaseLineFileUpdate(filepath, result.release())); 162 result.reset(new BaseLineFileUpdate(filepath, result.release()));
163 } 163 }
164 return result.release(); 164 return result.release();
165 } 165 }
166 } // namespace bwe 166 } // namespace bwe
167 } // namespace testing 167 } // namespace testing
168 } // namespace webrtc 168 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698