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

Side by Side Diff: chrome/browser/media/webrtc_logging_handler_host.cc

Issue 142923005: Allow MessageFilters to restrict listening to specific message classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 9 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/media/webrtc_logging_handler_host.h" 5 #include "chrome/browser/media/webrtc_logging_handler_host.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 it != meta_data.end(); ++it) { 102 it != meta_data.end(); ++it) {
103 *message += it->first + ": " + it->second + '\n'; 103 *message += it->first + ": " + it->second + '\n';
104 } 104 }
105 // Remove last '\n'. 105 // Remove last '\n'.
106 message->resize(message->size() - 1); 106 message->resize(message->size() - 1);
107 } 107 }
108 108
109 } // namespace 109 } // namespace
110 110
111 WebRtcLoggingHandlerHost::WebRtcLoggingHandlerHost(Profile* profile) 111 WebRtcLoggingHandlerHost::WebRtcLoggingHandlerHost(Profile* profile)
112 : profile_(profile), 112 : BrowserMessageFilter(WebRtcLoggingMsgStart),
113 profile_(profile),
113 logging_state_(CLOSED), 114 logging_state_(CLOSED),
114 upload_log_on_render_close_(false) { 115 upload_log_on_render_close_(false) {
115 DCHECK(profile_); 116 DCHECK(profile_);
116 } 117 }
117 118
118 WebRtcLoggingHandlerHost::~WebRtcLoggingHandlerHost() {} 119 WebRtcLoggingHandlerHost::~WebRtcLoggingHandlerHost() {}
119 120
120 void WebRtcLoggingHandlerHost::SetMetaData( 121 void WebRtcLoggingHandlerHost::SetMetaData(
121 const MetaDataMap& meta_data, 122 const MetaDataMap& meta_data,
122 const GenericDoneCallback& callback) { 123 const GenericDoneCallback& callback) {
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 void WebRtcLoggingHandlerHost::FireGenericDoneCallback( 419 void WebRtcLoggingHandlerHost::FireGenericDoneCallback(
419 GenericDoneCallback* callback, bool success, 420 GenericDoneCallback* callback, bool success,
420 const std::string& error_message) { 421 const std::string& error_message) {
421 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 422 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
422 DCHECK(!(*callback).is_null()); 423 DCHECK(!(*callback).is_null());
423 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 424 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
424 base::Bind(*callback, success, 425 base::Bind(*callback, success,
425 error_message)); 426 error_message));
426 (*callback).Reset(); 427 (*callback).Reset();
427 } 428 }
OLDNEW
« no previous file with comments | « chrome/browser/media/encrypted_media_message_filter_android.cc ('k') | chrome/browser/plugins/plugin_info_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698