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

Side by Side Diff: base/test/mock_log.cc

Issue 1592403002: update obsolete code.google.com documentation links (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 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
« no previous file with comments | « no previous file | build/common.gypi » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/test/mock_log.h" 5 #include "base/test/mock_log.h"
6 6
7 namespace base { 7 namespace base {
8 namespace test { 8 namespace test {
9 9
10 // static 10 // static
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 g_instance_ = nullptr; 49 g_instance_ = nullptr;
50 } 50 }
51 51
52 // static 52 // static
53 bool MockLog::LogMessageHandler(int severity, 53 bool MockLog::LogMessageHandler(int severity,
54 const char* file, 54 const char* file,
55 int line, 55 int line,
56 size_t message_start, 56 size_t message_start,
57 const std::string& str) { 57 const std::string& str) {
58 // gMock guarantees thread-safety for calling a mocked method 58 // gMock guarantees thread-safety for calling a mocked method
59 // (https://code.google.com/p/googlemock/wiki/CookBook#Using_Google_Mock_and_T hreads) 59 // (https://github.com/google/googlemock/blob/master/googlemock/docs/CookBook. md#using-google-mock-and-threads)
60 // but we also need to make sure that Start/StopCapturingLogs are synchronized 60 // but we also need to make sure that Start/StopCapturingLogs are synchronized
61 // with LogMessageHandler. 61 // with LogMessageHandler.
62 AutoLock scoped_lock(g_lock); 62 AutoLock scoped_lock(g_lock);
63 63
64 return g_instance_->Log(severity, file, line, message_start, str); 64 return g_instance_->Log(severity, file, line, message_start, str);
65 } 65 }
66 66
67 } // namespace test 67 } // namespace test
68 } // namespace base 68 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698