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

Side by Side Diff: ppapi/cpp/private/isolated_file_system_private.cc

Issue 26803004: PPAPI: Add PluginPrivateFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: overhaul Created 7 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/cpp/private/isolated_file_system_private.h" 5 #include "ppapi/cpp/private/isolated_file_system_private.h"
6 6
7 #include "ppapi/cpp/module_impl.h" 7 #include "ppapi/cpp/module_impl.h"
8 8
9 namespace pp { 9 namespace pp {
10 10
11 namespace { 11 namespace {
12 12
13 template <> const char* interface_name<PPB_IsolatedFileSystem_Private_0_1>() { 13 template <> const char* interface_name<PPB_IsolatedFileSystem_Private_0_2>() {
14 return PPB_ISOLATEDFILESYSTEM_PRIVATE_INTERFACE_0_1; 14 return PPB_ISOLATEDFILESYSTEM_PRIVATE_INTERFACE_0_2;
15 } 15 }
16 16
17 } // namespace 17 } // namespace
18 18
19 IsolatedFileSystemPrivate::IsolatedFileSystemPrivate() 19 IsolatedFileSystemPrivate::IsolatedFileSystemPrivate()
20 : instance_(0), type_(PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_INVALID) { 20 : instance_(0), type_(PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_INVALID) {
21 } 21 }
22 22
23 IsolatedFileSystemPrivate::IsolatedFileSystemPrivate( 23 IsolatedFileSystemPrivate::IsolatedFileSystemPrivate(
24 const InstanceHandle& instance, 24 const InstanceHandle& instance,
25 PP_IsolatedFileSystemType_Private type) 25 PP_IsolatedFileSystemType_Private type)
26 : instance_(instance.pp_instance()), type_(type) { 26 : instance_(instance.pp_instance()), type_(type) {
27 } 27 }
28 28
29 IsolatedFileSystemPrivate::~IsolatedFileSystemPrivate() { 29 IsolatedFileSystemPrivate::~IsolatedFileSystemPrivate() {
30 } 30 }
31 31
32 int32_t IsolatedFileSystemPrivate::Open( 32 int32_t IsolatedFileSystemPrivate::Open(
33 const CompletionCallbackWithOutput<pp::FileSystem>& cc) { 33 const CompletionCallbackWithOutput<pp::FileSystem>& cc) {
34 if (!has_interface<PPB_IsolatedFileSystem_Private_0_1>()) 34 if (!has_interface<PPB_IsolatedFileSystem_Private_0_2>())
35 return cc.MayForce(PP_ERROR_NOINTERFACE); 35 return cc.MayForce(PP_ERROR_NOINTERFACE);
36 return get_interface<PPB_IsolatedFileSystem_Private_0_1>()-> 36 return get_interface<PPB_IsolatedFileSystem_Private_0_2>()->
37 Open(instance_, type_, cc.output(), cc.pp_completion_callback()); 37 Open(instance_, type_, cc.output(), cc.pp_completion_callback());
38 } 38 }
39 39
40 } // namespace pp 40 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698