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

Side by Side Diff: content/browser/media/media_internals_proxy.cc

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict 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 (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 "content/browser/media/media_internals_proxy.h" 5 #include "content/browser/media/media_internals_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/browser/media/media_internals_handler.h" 9 #include "content/browser/media/media_internals_handler.h"
10 #include "content/public/browser/content_browser_client.h" 10 #include "content/public/browser/content_browser_client.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 return constants; 115 return constants;
116 } 116 }
117 117
118 void MediaInternalsProxy::ObserveMediaInternalsOnIOThread() { 118 void MediaInternalsProxy::ObserveMediaInternalsOnIOThread() {
119 DCHECK_CURRENTLY_ON(BrowserThread::IO); 119 DCHECK_CURRENTLY_ON(BrowserThread::IO);
120 update_callback_ = base::Bind(&MediaInternalsProxy::OnUpdate, 120 update_callback_ = base::Bind(&MediaInternalsProxy::OnUpdate,
121 base::Unretained(this)); 121 base::Unretained(this));
122 MediaInternals::GetInstance()->AddUpdateCallback(update_callback_); 122 MediaInternals::GetInstance()->AddUpdateCallback(update_callback_);
123 if (GetContentClient()->browser()->GetNetLog()) { 123 if (GetContentClient()->browser()->GetNetLog()) {
124 net::NetLog* net_log = GetContentClient()->browser()->GetNetLog(); 124 net::NetLog* net_log = GetContentClient()->browser()->GetNetLog();
125 net_log->DeprecatedAddObserver(this, net::NetLog::LOG_ALL_BUT_BYTES); 125 net_log->DeprecatedAddObserver(
126 this, net::NetLogCaptureMode::IncludeCookiesAndCredentials());
126 } 127 }
127 } 128 }
128 129
129 void MediaInternalsProxy::StopObservingMediaInternalsOnIOThread() { 130 void MediaInternalsProxy::StopObservingMediaInternalsOnIOThread() {
130 DCHECK_CURRENTLY_ON(BrowserThread::IO); 131 DCHECK_CURRENTLY_ON(BrowserThread::IO);
131 MediaInternals::GetInstance()->RemoveUpdateCallback(update_callback_); 132 MediaInternals::GetInstance()->RemoveUpdateCallback(update_callback_);
132 if (GetContentClient()->browser()->GetNetLog()) { 133 if (GetContentClient()->browser()->GetNetLog()) {
133 net::NetLog* net_log = GetContentClient()->browser()->GetNetLog(); 134 net::NetLog* net_log = GetContentClient()->browser()->GetNetLog();
134 net_log->DeprecatedRemoveObserver(this); 135 net_log->DeprecatedRemoveObserver(this);
135 } 136 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 const std::string& function, base::Value* args) { 175 const std::string& function, base::Value* args) {
175 DCHECK_CURRENTLY_ON(BrowserThread::UI); 176 DCHECK_CURRENTLY_ON(BrowserThread::UI);
176 scoped_ptr<base::Value> args_value(args); 177 scoped_ptr<base::Value> args_value(args);
177 std::vector<const base::Value*> args_vector; 178 std::vector<const base::Value*> args_vector;
178 args_vector.push_back(args_value.get()); 179 args_vector.push_back(args_value.get());
179 base::string16 update = WebUI::GetJavascriptCall(function, args_vector); 180 base::string16 update = WebUI::GetJavascriptCall(function, args_vector);
180 UpdateUIOnUIThread(update); 181 UpdateUIOnUIThread(update);
181 } 182 }
182 183
183 } // namespace content 184 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_net_log_parameters.cc ('k') | extensions/browser/api/web_request/web_request_api_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698