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

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

Issue 543893002: Random fixes through Chrome for scoped_reftpr T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.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) 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 #include <string> 5 #include <string>
6 6
7 #include "base/test/test_pending_task.h" 7 #include "base/test/test_pending_task.h"
8 8
9 namespace base { 9 namespace base {
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 state->SetString("nestability", "NON_NESTABLE"); 47 state->SetString("nestability", "NON_NESTABLE");
48 break; 48 break;
49 } 49 }
50 state->SetInteger("delay", delay.ToInternalValue()); 50 state->SetInteger("delay", delay.ToInternalValue());
51 } 51 }
52 52
53 scoped_refptr<base::debug::ConvertableToTraceFormat> TestPendingTask::AsValue() 53 scoped_refptr<base::debug::ConvertableToTraceFormat> TestPendingTask::AsValue()
54 const { 54 const {
55 scoped_refptr<base::debug::TracedValue> state = 55 scoped_refptr<base::debug::TracedValue> state =
56 new base::debug::TracedValue(); 56 new base::debug::TracedValue();
57 AsValueInto(state); 57 AsValueInto(state.get());
58 return state; 58 return state;
59 } 59 }
60 60
61 std::string TestPendingTask::ToString() const { 61 std::string TestPendingTask::ToString() const {
62 std::string output("TestPendingTask("); 62 std::string output("TestPendingTask(");
63 AsValue()->AppendAsTraceFormat(&output); 63 AsValue()->AppendAsTraceFormat(&output);
64 output += ")"; 64 output += ")";
65 return output; 65 return output;
66 } 66 }
67 67
68 std::ostream& operator<<(std::ostream& os, const TestPendingTask& task) { 68 std::ostream& operator<<(std::ostream& os, const TestPendingTask& task) {
69 PrintTo(task, &os); 69 PrintTo(task, &os);
70 return os; 70 return os;
71 } 71 }
72 72
73 void PrintTo(const TestPendingTask& task, std::ostream* os) { 73 void PrintTo(const TestPendingTask& task, std::ostream* os) {
74 *os << task.ToString(); 74 *os << task.ToString();
75 } 75 }
76 76
77 } // namespace base 77 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698