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

Side by Side Diff: content/browser/devtools/devtools_io_context.cc

Issue 2500093002: [DevTools] Move IO and Tracing to new generator. (Closed)
Patch Set: roll Created 4 years, 1 month 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
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 "content/browser/devtools/devtools_io_context.h" 5 #include "content/browser/devtools/devtools_io_context.h"
6 6
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/third_party/icu/icu_utf.h" 11 #include "base/third_party/icu/icu_utf.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 13
14 namespace content { 14 namespace content {
15 namespace devtools {
16 15
17 namespace { 16 namespace {
18 unsigned s_last_stream_handle = 0; 17 unsigned s_last_stream_handle = 0;
19 } 18 }
20 19
21 using Stream = DevToolsIOContext::Stream; 20 using Stream = DevToolsIOContext::Stream;
22 21
23 Stream::Stream() 22 Stream::Stream()
24 : base::RefCountedDeleteOnMessageLoop<Stream>( 23 : base::RefCountedDeleteOnMessageLoop<Stream>(
25 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)), 24 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)),
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 132 }
134 133
135 bool DevToolsIOContext::Close(const std::string& handle) { 134 bool DevToolsIOContext::Close(const std::string& handle) {
136 return streams_.erase(handle) == 1; 135 return streams_.erase(handle) == 1;
137 } 136 }
138 137
139 void DevToolsIOContext::DiscardAllStreams() { 138 void DevToolsIOContext::DiscardAllStreams() {
140 return streams_.clear(); 139 return streams_.clear();
141 } 140 }
142 141
143 } // namespace devtools
144 } // namespace content 142 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_io_context.h ('k') | content/browser/devtools/devtools_protocol_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698