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

Side by Side Diff: net/log/net_log_unittest.cc

Issue 1545233002: Convert Pass()→std::move() in //net (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 | « net/log/net_log.cc ('k') | net/log/net_log_util.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "net/log/net_log.h" 5 #include "net/log/net_log.h"
6 6
7 #include <utility>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/synchronization/waitable_event.h" 11 #include "base/synchronization/waitable_event.h"
10 #include "base/threading/simple_thread.h" 12 #include "base/threading/simple_thread.h"
11 #include "base/values.h" 13 #include "base/values.h"
12 #include "net/base/net_errors.h" 14 #include "net/base/net_errors.h"
13 #include "net/log/test_net_log.h" 15 #include "net/log/test_net_log.h"
14 #include "net/log/test_net_log_entry.h" 16 #include "net/log/test_net_log_entry.h"
15 #include "net/log/test_net_log_util.h" 17 #include "net/log/test_net_log_util.h"
16 18
(...skipping 20 matching lines...) Expand all
37 } 39 }
38 40
39 scoped_ptr<base::Value> CaptureModeToValue(NetLogCaptureMode capture_mode) { 41 scoped_ptr<base::Value> CaptureModeToValue(NetLogCaptureMode capture_mode) {
40 return make_scoped_ptr( 42 return make_scoped_ptr(
41 new base::FundamentalValue(CaptureModeToInt(capture_mode))); 43 new base::FundamentalValue(CaptureModeToInt(capture_mode)));
42 } 44 }
43 45
44 scoped_ptr<base::Value> NetCaptureModeCallback(NetLogCaptureMode capture_mode) { 46 scoped_ptr<base::Value> NetCaptureModeCallback(NetLogCaptureMode capture_mode) {
45 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 47 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
46 dict->Set("capture_mode", CaptureModeToValue(capture_mode)); 48 dict->Set("capture_mode", CaptureModeToValue(capture_mode));
47 return dict.Pass(); 49 return std::move(dict);
48 } 50 }
49 51
50 TEST(NetLogTest, Basic) { 52 TEST(NetLogTest, Basic) {
51 TestNetLog net_log; 53 TestNetLog net_log;
52 TestNetLogEntry::List entries; 54 TestNetLogEntry::List entries;
53 net_log.GetEntries(&entries); 55 net_log.GetEntries(&entries);
54 EXPECT_EQ(0u, entries.size()); 56 EXPECT_EQ(0u, entries.size());
55 57
56 net_log.AddGlobalEntry(NetLog::TYPE_CANCELLED); 58 net_log.AddGlobalEntry(NetLog::TYPE_CANCELLED);
57 59
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 NetLog net_log; 391 NetLog net_log;
390 392
391 // Run a bunch of threads to completion, each of which will repeatedly add 393 // Run a bunch of threads to completion, each of which will repeatedly add
392 // and remove an observer, and set its logging level. 394 // and remove an observer, and set its logging level.
393 RunTestThreads<AddRemoveObserverTestThread>(&net_log); 395 RunTestThreads<AddRemoveObserverTestThread>(&net_log);
394 } 396 }
395 397
396 } // namespace 398 } // namespace
397 399
398 } // namespace net 400 } // namespace net
OLDNEW
« no previous file with comments | « net/log/net_log.cc ('k') | net/log/net_log_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698