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

Side by Side Diff: base/process_util_unittest.cc

Issue 10004001: Add virtual and OVERRIDE to base/ implementation files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback from chromium-dev Created 8 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 | Annotate | Revision Log
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 <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/eintr_wrapper.h" 10 #include "base/eintr_wrapper.h"
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 class OutOfMemoryDeathTest : public testing::Test { 932 class OutOfMemoryDeathTest : public testing::Test {
933 public: 933 public:
934 OutOfMemoryDeathTest() 934 OutOfMemoryDeathTest()
935 : value_(NULL), 935 : value_(NULL),
936 // Make test size as large as possible minus a few pages so 936 // Make test size as large as possible minus a few pages so
937 // that alignment or other rounding doesn't make it wrap. 937 // that alignment or other rounding doesn't make it wrap.
938 test_size_(std::numeric_limits<std::size_t>::max() - 12 * 1024), 938 test_size_(std::numeric_limits<std::size_t>::max() - 12 * 1024),
939 signed_test_size_(std::numeric_limits<ssize_t>::max()) { 939 signed_test_size_(std::numeric_limits<ssize_t>::max()) {
940 } 940 }
941 941
942 virtual void SetUp() { 942 virtual void SetUp() OVERRIDE {
943 #if defined(USE_TCMALLOC) 943 #if defined(USE_TCMALLOC)
jar (doing other things) 2012/04/05 21:11:30 nit: can we move line 943 to 941, and line 949 to
944 tc_set_new_mode(1); 944 tc_set_new_mode(1);
945 } 945 }
946 946
947 virtual void TearDown() { 947 virtual void TearDown() OVERRIDE {
948 tc_set_new_mode(0); 948 tc_set_new_mode(0);
949 #endif // defined(USE_TCMALLOC) 949 #endif // defined(USE_TCMALLOC)
950 } 950 }
951 951
952 void SetUpInDeathAssert() { 952 void SetUpInDeathAssert() {
953 // Must call EnableTerminationOnOutOfMemory() because that is called from 953 // Must call EnableTerminationOnOutOfMemory() because that is called from
954 // chrome's main function and therefore hasn't been called yet. 954 // chrome's main function and therefore hasn't been called yet.
955 // Since this call may result in another thread being created and death 955 // Since this call may result in another thread being created and death
956 // tests shouldn't be started in a multithread environment, this call 956 // tests shouldn't be started in a multithread environment, this call
957 // should be done inside of the ASSERT_DEATH. 957 // should be done inside of the ASSERT_DEATH.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 SetUpInDeathAssert(); 1156 SetUpInDeathAssert();
1157 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {} 1157 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {}
1158 }, ""); 1158 }, "");
1159 } 1159 }
1160 1160
1161 #endif // !ARCH_CPU_64_BITS 1161 #endif // !ARCH_CPU_64_BITS
1162 #endif // OS_MACOSX 1162 #endif // OS_MACOSX
1163 1163
1164 #endif // !defined(OS_ANDROID) && !defined(OS_OPENBSD) && 1164 #endif // !defined(OS_ANDROID) && !defined(OS_OPENBSD) &&
1165 // !defined(OS_WIN) && !defined(ADDRESS_SANITIZER) 1165 // !defined(OS_WIN) && !defined(ADDRESS_SANITIZER)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698