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

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

Issue 7623018: Move host resource from the proxy to the shared_impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/plugin_resource_tracker.cc ('k') | ppapi/proxy/ppapi_messages.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/process.h" 6 #include "base/process.h"
7 #include "ppapi/proxy/mock_resource.h" 7 #include "ppapi/proxy/mock_resource.h"
8 #include "ppapi/proxy/plugin_dispatcher.h" 8 #include "ppapi/proxy/plugin_dispatcher.h"
9 #include "ppapi/proxy/plugin_resource_tracker.h" 9 #include "ppapi/proxy/plugin_resource_tracker.h"
10 #include "ppapi/proxy/ppapi_messages.h" 10 #include "ppapi/proxy/ppapi_messages.h"
11 #include "ppapi/proxy/ppapi_proxy_test.h" 11 #include "ppapi/proxy/ppapi_proxy_test.h"
12 12
13 using ppapi::HostResource;
14
13 namespace pp { 15 namespace pp {
14 namespace proxy { 16 namespace proxy {
15 17
16 namespace { 18 namespace {
17 19
18 // Object so we know when a resource has been released. 20 // Object so we know when a resource has been released.
19 class TrackedMockResource : public MockResource { 21 class TrackedMockResource : public MockResource {
20 public: 22 public:
21 TrackedMockResource(const HostResource& serialized) 23 TrackedMockResource(const HostResource& serialized)
22 : MockResource(serialized) { 24 : MockResource(serialized) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 tracker().PluginResourceForHostResource(serialized)); 66 tracker().PluginResourceForHostResource(serialized));
65 67
66 // Releasing the resource should have freed it. 68 // Releasing the resource should have freed it.
67 tracker().ReleaseResource(plugin_resource); 69 tracker().ReleaseResource(plugin_resource);
68 EXPECT_EQ(0, TrackedMockResource::tracked_alive_count); 70 EXPECT_EQ(0, TrackedMockResource::tracked_alive_count);
69 EXPECT_EQ(0, tracker().PluginResourceForHostResource(serialized)); 71 EXPECT_EQ(0, tracker().PluginResourceForHostResource(serialized));
70 } 72 }
71 73
72 } // namespace proxy 74 } // namespace proxy
73 } // namespace pp 75 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_resource_tracker.cc ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698