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

Side by Side Diff: chrome/common/multi_process_lock_unittest.cc

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « chrome/common/multi_process_lock_mac.cc ('k') | chrome/common/multi_process_lock_win.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
6 #include "base/environment.h" 5 #include "base/environment.h"
7 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/process/kill.h" 9 #include "base/process/kill.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 #include "base/test/multiprocess_test.h" 12 #include "base/test/multiprocess_test.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "build/build_config.h"
14 #include "chrome/common/multi_process_lock.h" 15 #include "chrome/common/multi_process_lock.h"
15 #include "testing/multiprocess_func_list.h" 16 #include "testing/multiprocess_func_list.h"
16 17
17 class MultiProcessLockTest : public base::MultiProcessTest { 18 class MultiProcessLockTest : public base::MultiProcessTest {
18 public: 19 public:
19 static const char kLockEnviromentVarName[]; 20 static const char kLockEnviromentVarName[];
20 21
21 class ScopedEnvironmentVariable { 22 class ScopedEnvironmentVariable {
22 public: 23 public:
23 ScopedEnvironmentVariable(const std::string &name, 24 ScopedEnvironmentVariable(const std::string &name,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 EXPECT_TRUE(environment->GetVar(MultiProcessLockTest::kLockEnviromentVarName, 169 EXPECT_TRUE(environment->GetVar(MultiProcessLockTest::kLockEnviromentVarName,
169 &name)); 170 &name));
170 scoped_ptr<MultiProcessLock> test_lock( 171 scoped_ptr<MultiProcessLock> test_lock(
171 MultiProcessLock::Create(name)); 172 MultiProcessLock::Create(name));
172 173
173 // Expect locking to succeed because it is not claimed yet. 174 // Expect locking to succeed because it is not claimed yet.
174 bool locked_successfully = test_lock->TryLock(); 175 bool locked_successfully = test_lock->TryLock();
175 EXPECT_TRUE(locked_successfully); 176 EXPECT_TRUE(locked_successfully);
176 return !locked_successfully; 177 return !locked_successfully;
177 } 178 }
OLDNEW
« no previous file with comments | « chrome/common/multi_process_lock_mac.cc ('k') | chrome/common/multi_process_lock_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698