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

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

Issue 1097393007: Update {virtual,override} to follow C++11 style in ppapi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split off one file into separate review. 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
« no previous file with comments | « ppapi/proxy/ppb_x509_certificate_private_proxy.cc ('k') | ppapi/proxy/ppp_messaging_proxy.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) 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/test/test_timeouts.h" 7 #include "base/test/test_timeouts.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "ppapi/c/dev/ppb_var_deprecated.h" 9 #include "ppapi/c/dev/ppb_var_deprecated.h"
10 #include "ppapi/c/dev/ppp_class_deprecated.h" 10 #include "ppapi/c/dev/ppp_class_deprecated.h"
11 #include "ppapi/c/pp_var.h" 11 #include "ppapi/c/pp_var.h"
12 #include "ppapi/c/ppb_var.h" 12 #include "ppapi/c/ppb_var.h"
13 #include "ppapi/c/ppp_instance.h" 13 #include "ppapi/c/ppp_instance.h"
14 #include "ppapi/c/private/ppp_instance_private.h" 14 #include "ppapi/c/private/ppp_instance_private.h"
15 #include "ppapi/proxy/host_dispatcher.h" 15 #include "ppapi/proxy/host_dispatcher.h"
16 #include "ppapi/proxy/interface_list.h" 16 #include "ppapi/proxy/interface_list.h"
17 #include "ppapi/proxy/ppapi_proxy_test.h" 17 #include "ppapi/proxy/ppapi_proxy_test.h"
18 #include "ppapi/shared_impl/ppapi_permissions.h" 18 #include "ppapi/shared_impl/ppapi_permissions.h"
19 #include "ppapi/shared_impl/ppb_var_shared.h" 19 #include "ppapi/shared_impl/ppb_var_shared.h"
20 #include "ppapi/shared_impl/var.h" 20 #include "ppapi/shared_impl/var.h"
21 21
22 namespace ppapi { 22 namespace ppapi {
23 23
24 // A fake version of V8ObjectVar for testing. 24 // A fake version of V8ObjectVar for testing.
25 class V8ObjectVar : public ppapi::Var { 25 class V8ObjectVar : public ppapi::Var {
26 public: 26 public:
27 V8ObjectVar() {} 27 V8ObjectVar() {}
28 virtual ~V8ObjectVar() {} 28 ~V8ObjectVar() override {}
29 29
30 // Var overrides. 30 // Var overrides.
31 virtual V8ObjectVar* AsV8ObjectVar() override { return this; } 31 V8ObjectVar* AsV8ObjectVar() override { return this; }
32 virtual PP_VarType GetType() const override { return PP_VARTYPE_OBJECT; } 32 PP_VarType GetType() const override { return PP_VARTYPE_OBJECT; }
33 }; 33 };
34 34
35 namespace proxy { 35 namespace proxy {
36 36
37 namespace { 37 namespace {
38 const PP_Instance kInstance = 0xdeadbeef; 38 const PP_Instance kInstance = 0xdeadbeef;
39 39
40 PP_Var GetPPVarNoAddRef(Var* var) { 40 PP_Var GetPPVarNoAddRef(Var* var) {
41 PP_Var var_to_return = var->GetPPVar(); 41 PP_Var var_to_return = var->GetPPVar();
42 PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(var_to_return); 42 PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(var_to_return);
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // Destroy the instance. DidDestroy above decrements the reference count for 201 // Destroy the instance. DidDestroy above decrements the reference count for
202 // instance_obj, so it should also be destroyed. 202 // instance_obj, so it should also be destroyed.
203 ppp_instance->DidDestroy(kInstance); 203 ppp_instance->DidDestroy(kInstance);
204 EXPECT_EQ(-1, plugin().var_tracker().GetRefCountForObject(instance_obj)); 204 EXPECT_EQ(-1, plugin().var_tracker().GetRefCountForObject(instance_obj));
205 EXPECT_EQ(-1, host().var_tracker().GetRefCountForObject(host_pp_var)); 205 EXPECT_EQ(-1, host().var_tracker().GetRefCountForObject(host_pp_var));
206 } 206 }
207 207
208 } // namespace proxy 208 } // namespace proxy
209 } // namespace ppapi 209 } // namespace ppapi
210 210
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_x509_certificate_private_proxy.cc ('k') | ppapi/proxy/ppp_messaging_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698