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

Side by Side Diff: content/public/browser/browser_message_filter.cc

Issue 504273002: Remove implicit conversions from scoped_refptr to T* in content/ (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
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/public/browser/browser_message_filter.h" 5 #include "content/public/browser/browser_message_filter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 runner->PostTask( 60 runner->PostTask(
61 FROM_HERE, 61 FROM_HERE,
62 base::Bind( 62 base::Bind(
63 base::IgnoreResult(&Internal::DispatchMessage), this, message)); 63 base::IgnoreResult(&Internal::DispatchMessage), this, message));
64 return true; 64 return true;
65 } 65 }
66 return DispatchMessage(message); 66 return DispatchMessage(message);
67 } 67 }
68 68
69 if (thread == BrowserThread::UI && 69 if (thread == BrowserThread::UI &&
70 !BrowserMessageFilter::CheckCanDispatchOnUI(message, filter_)) { 70 !BrowserMessageFilter::CheckCanDispatchOnUI(message, filter_.get())) {
71 return true; 71 return true;
72 } 72 }
73 73
74 BrowserThread::PostTask( 74 BrowserThread::PostTask(
75 thread, FROM_HERE, 75 thread, FROM_HERE,
76 base::Bind( 76 base::Bind(
77 base::IgnoreResult(&Internal::DispatchMessage), this, message)); 77 base::IgnoreResult(&Internal::DispatchMessage), this, message));
78 return true; 78 return true;
79 } 79 }
80 80
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 IPC::MessageFilter* BrowserMessageFilter::GetFilter() { 219 IPC::MessageFilter* BrowserMessageFilter::GetFilter() {
220 // We create this on demand so that if a filter is used in a unit test but 220 // We create this on demand so that if a filter is used in a unit test but
221 // never attached to a channel, we don't leak Internal and this; 221 // never attached to a channel, we don't leak Internal and this;
222 DCHECK(!internal_) << "Should only be called once."; 222 DCHECK(!internal_) << "Should only be called once.";
223 internal_ = new Internal(this); 223 internal_ = new Internal(this);
224 return internal_; 224 return internal_;
225 } 225 }
226 226
227 } // namespace content 227 } // namespace content
OLDNEW
« no previous file with comments | « content/child/threaded_data_provider.cc ('k') | content/public/renderer/video_encode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698