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

Side by Side Diff: base/process/memory_unittest.cc

Issue 611153004: replace OVERRIDE and FINAL with override and final in base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CC_ -> BASE_ Created 6 years, 2 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 | « base/process/kill_posix.cc ('k') | base/process/process_iterator.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 #define _CRT_SECURE_NO_WARNINGS 5 #define _CRT_SECURE_NO_WARNINGS
6 6
7 #include "base/process/memory.h" 7 #include "base/process/memory.h"
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 public: 175 public:
176 OutOfMemoryTest() 176 OutOfMemoryTest()
177 : value_(NULL), 177 : value_(NULL),
178 // Make test size as large as possible minus a few pages so 178 // Make test size as large as possible minus a few pages so
179 // that alignment or other rounding doesn't make it wrap. 179 // that alignment or other rounding doesn't make it wrap.
180 test_size_(std::numeric_limits<std::size_t>::max() - 12 * 1024), 180 test_size_(std::numeric_limits<std::size_t>::max() - 12 * 1024),
181 signed_test_size_(std::numeric_limits<ssize_t>::max()) { 181 signed_test_size_(std::numeric_limits<ssize_t>::max()) {
182 } 182 }
183 183
184 #if defined(USE_TCMALLOC) 184 #if defined(USE_TCMALLOC)
185 virtual void SetUp() OVERRIDE { 185 virtual void SetUp() override {
186 tc_set_new_mode(1); 186 tc_set_new_mode(1);
187 } 187 }
188 188
189 virtual void TearDown() OVERRIDE { 189 virtual void TearDown() override {
190 tc_set_new_mode(0); 190 tc_set_new_mode(0);
191 } 191 }
192 #endif // defined(USE_TCMALLOC) 192 #endif // defined(USE_TCMALLOC)
193 193
194 protected: 194 protected:
195 void* value_; 195 void* value_;
196 size_t test_size_; 196 size_t test_size_;
197 ssize_t signed_test_size_; 197 ssize_t signed_test_size_;
198 }; 198 };
199 199
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 bytes = static_cast<const char*>(value_); 442 bytes = static_cast<const char*>(value_);
443 for (size_t i = 0; i < (kSafeCallocItems * kSafeCallocSize); ++i) 443 for (size_t i = 0; i < (kSafeCallocItems * kSafeCallocSize); ++i)
444 EXPECT_EQ(0, bytes[i]); 444 EXPECT_EQ(0, bytes[i]);
445 free(value_); 445 free(value_);
446 446
447 EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_)); 447 EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_));
448 EXPECT_TRUE(value_ == NULL); 448 EXPECT_TRUE(value_ == NULL);
449 } 449 }
450 #endif // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) 450 #endif // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
451 #endif // !defined(OS_ANDROID) && !defined(OS_OPENBSD) && !defined(OS_WIN) 451 #endif // !defined(OS_ANDROID) && !defined(OS_OPENBSD) && !defined(OS_WIN)
OLDNEW
« no previous file with comments | « base/process/kill_posix.cc ('k') | base/process/process_iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698