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

Side by Side Diff: ppapi/proxy/ppapi_proxy_test.cc

Issue 982413002: base: Stop passing a non-const ref to ObserverListBase::Iterator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: observerref: fixwindowsbuild Created 5 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
« no previous file with comments | « net/base/net_log.cc ('k') | remoting/client/plugin/delegating_signal_strategy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ppapi/proxy/ppapi_proxy_test.h" 5 #include "ppapi/proxy/ppapi_proxy_test.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // We assume that only 1 harness's GetInterface function will ever support a 58 // We assume that only 1 harness's GetInterface function will ever support a
59 // given interface name. In practice, there will either be only 1 GetInterface 59 // given interface name. In practice, there will either be only 1 GetInterface
60 // handler (for PluginProxyTest or HostProxyTest), or there will be only 2 60 // handler (for PluginProxyTest or HostProxyTest), or there will be only 2
61 // GetInterface handlers (for TwoWayTest). In the latter case, one handler is 61 // GetInterface handlers (for TwoWayTest). In the latter case, one handler is
62 // for the PluginProxyTestHarness and should only respond for PPP interfaces, 62 // for the PluginProxyTestHarness and should only respond for PPP interfaces,
63 // and the other handler is for the HostProxyTestHarness which should only 63 // and the other handler is for the HostProxyTestHarness which should only
64 // ever respond for PPB interfaces. 64 // ever respond for PPB interfaces.
65 ObserverList<ProxyTestHarnessBase> get_interface_handlers_; 65 ObserverList<ProxyTestHarnessBase> get_interface_handlers_;
66 66
67 const void* MockGetInterface(const char* name) { 67 const void* MockGetInterface(const char* name) {
68 ObserverList<ProxyTestHarnessBase>::Iterator it = 68 ObserverList<ProxyTestHarnessBase>::Iterator it(&get_interface_handlers_);
69 get_interface_handlers_;
70 while (ProxyTestHarnessBase* observer = it.GetNext()) { 69 while (ProxyTestHarnessBase* observer = it.GetNext()) {
71 const void* interface = observer->GetInterface(name); 70 const void* interface = observer->GetInterface(name);
72 if (interface) 71 if (interface)
73 return interface; 72 return interface;
74 } 73 }
75 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) 74 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0)
76 return &ppb_proxy_private; 75 return &ppb_proxy_private;
77 return NULL; 76 return NULL;
78 } 77 }
79 78
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 plugin_thread_.message_loop_proxy()->PostTask(FROM_HERE, 574 plugin_thread_.message_loop_proxy()->PostTask(FROM_HERE,
576 base::Bind(&RunTaskOnRemoteHarness, 575 base::Bind(&RunTaskOnRemoteHarness,
577 task, 576 task,
578 &task_complete)); 577 &task_complete));
579 task_complete.Wait(); 578 task_complete.Wait();
580 } 579 }
581 580
582 581
583 } // namespace proxy 582 } // namespace proxy
584 } // namespace ppapi 583 } // namespace ppapi
OLDNEW
« no previous file with comments | « net/base/net_log.cc ('k') | remoting/client/plugin/delegating_signal_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698