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

Side by Side Diff: ui/file_manager/zip_archiver/cpp/module.cc

Issue 2807063002: Replace Libarchive with MiniZip. (Closed)
Patch Set: Fix a few nits. Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium OS Authors. All rights reserved. 1 // Copyright 2014 The Chromium OS 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 <clocale> 5 #include <clocale>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "ppapi/cpp/instance.h" 8 #include "ppapi/cpp/instance.h"
9 #include "ppapi/cpp/instance_handle.h" 9 #include "ppapi/cpp/instance_handle.h"
10 #include "ppapi/cpp/logging.h" 10 #include "ppapi/cpp/logging.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 JavaScriptPostMessage(request::CreateCreateArchiveDoneResponse( 103 JavaScriptPostMessage(request::CreateCreateArchiveDoneResponse(
104 compressor_id)); 104 compressor_id));
105 } 105 }
106 106
107 virtual void SendReadFileChunk(int compressor_id, int64_t length) { 107 virtual void SendReadFileChunk(int compressor_id, int64_t length) {
108 JavaScriptPostMessage(request::CreateReadFileChunkRequest( 108 JavaScriptPostMessage(request::CreateReadFileChunkRequest(
109 compressor_id, length)); 109 compressor_id, length));
110 } 110 }
111 111
112 virtual void SendWriteChunk(int compressor_id, 112 virtual void SendWriteChunk(int compressor_id,
113 const pp::VarArrayBuffer& array_buffer, 113 const pp::VarArrayBuffer& array_buffer,
114 int64_t length) { 114 int64_t offset,
115 int64_t length) {
115 JavaScriptPostMessage(request::CreateWriteChunkRequest( 116 JavaScriptPostMessage(request::CreateWriteChunkRequest(
116 compressor_id, array_buffer, length)); 117 compressor_id, array_buffer, offset, length));
117 } 118 }
118 119
119 virtual void SendAddToArchiveDone(int compressor_id) { 120 virtual void SendAddToArchiveDone(int compressor_id) {
120 JavaScriptPostMessage(request::CreateAddToArchiveDoneResponse( 121 JavaScriptPostMessage(request::CreateAddToArchiveDoneResponse(
121 compressor_id)); 122 compressor_id));
122 } 123 }
123 124
124 virtual void SendCloseArchiveDone(int compressor_id) { 125 virtual void SendCloseArchiveDone(int compressor_id) {
125 JavaScriptPostMessage(request::CreateCloseArchiveDoneResponse( 126 JavaScriptPostMessage(request::CreateCloseArchiveDoneResponse(
126 compressor_id)); 127 compressor_id));
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 // The browser keeps a singleton of this module. It calls the 492 // The browser keeps a singleton of this module. It calls the
492 // CreateInstance() method on the object you return to make instances. There 493 // CreateInstance() method on the object you return to make instances. There
493 // is one instance per <embed> tag on the page. This is the main binding 494 // is one instance per <embed> tag on the page. This is the main binding
494 // point for your NaCl module with the browser. 495 // point for your NaCl module with the browser.
495 Module* CreateModule() { 496 Module* CreateModule() {
496 std::setlocale(LC_ALL, "en_US.UTF-8"); 497 std::setlocale(LC_ALL, "en_US.UTF-8");
497 return new NaclArchiveModule(); 498 return new NaclArchiveModule();
498 } 499 }
499 500
500 } // namespace pp 501 } // namespace pp
OLDNEW
« no previous file with comments | « ui/file_manager/zip_archiver/cpp/javascript_message_sender_interface.h ('k') | ui/file_manager/zip_archiver/cpp/request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698