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

Side by Side Diff: chrome/browser/extensions/api/log_private/log_private_api_chromeos.cc

Issue 1084533002: Rename NetLogLogger and CapturingNetLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/extensions/api/log_private/log_private_api.h" 5 #include "chrome/browser/extensions/api/log_private/log_private_api.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 return file->reset(file_ptr); 280 return file->reset(file_ptr);
281 } 281 }
282 282
283 void LogPrivateAPI::StartObservingNetEvents( 283 void LogPrivateAPI::StartObservingNetEvents(
284 IOThread* io_thread, 284 IOThread* io_thread,
285 base::ScopedFILE* file) { 285 base::ScopedFILE* file) {
286 DCHECK_CURRENTLY_ON(BrowserThread::IO); 286 DCHECK_CURRENTLY_ON(BrowserThread::IO);
287 if (!file->get()) 287 if (!file->get())
288 return; 288 return;
289 289
290 net_log_logger_.reset(new net::NetLogLogger()); 290 net_log_logger_.reset(new net::WriteToFileNetLogObserver());
291 net_log_logger_->set_log_level(net::NetLog::LOG_ALL_BUT_BYTES); 291 net_log_logger_->set_log_level(net::NetLog::LOG_ALL_BUT_BYTES);
292 net_log_logger_->StartObserving(io_thread->net_log(), file->Pass(), nullptr, 292 net_log_logger_->StartObserving(io_thread->net_log(), file->Pass(), nullptr,
293 nullptr); 293 nullptr);
294 } 294 }
295 295
296 void LogPrivateAPI::MaybeStartNetInternalLogging( 296 void LogPrivateAPI::MaybeStartNetInternalLogging(
297 const std::string& caller_extension_id, 297 const std::string& caller_extension_id,
298 IOThread* io_thread, 298 IOThread* io_thread,
299 api::log_private::EventSink event_sink) { 299 api::log_private::EventSink event_sink) {
300 DCHECK_CURRENTLY_ON(BrowserThread::IO); 300 DCHECK_CURRENTLY_ON(BrowserThread::IO);
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 entry->SetBoolean("isDirectory", false); 539 entry->SetBoolean("isDirectory", false);
540 base::ListValue* entry_list = new base::ListValue(); 540 base::ListValue* entry_list = new base::ListValue();
541 entry_list->Append(entry); 541 entry_list->Append(entry);
542 response->Set("entries", entry_list); 542 response->Set("entries", entry_list);
543 response->SetBoolean("multiple", false); 543 response->SetBoolean("multiple", false);
544 SetResult(response.release()); 544 SetResult(response.release());
545 SendResponse(succeeded); 545 SendResponse(succeeded);
546 } 546 }
547 547
548 } // namespace extensions 548 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698