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

Side by Side Diff: third_party/zlib/google/zip_reader.cc

Issue 222323002: Move internal zip code from zip.cc to zip_internal.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 (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 "third_party/zlib/google/zip_reader.h" 5 #include "third_party/zlib/google/zip_reader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 zip_file_ = internal::OpenHandleForUnzipping(zip_fd); 100 zip_file_ = internal::OpenHandleForUnzipping(zip_fd);
101 #endif 101 #endif
102 if (!zip_file_) { 102 if (!zip_file_) {
103 return false; 103 return false;
104 } 104 }
105 105
106 return OpenInternal(); 106 return OpenInternal();
107 } 107 }
108 108
109 bool ZipReader::OpenFromString(const std::string& data) { 109 bool ZipReader::OpenFromString(const std::string& data) {
110 zip_file_ = internal::PreprareMemoryForUnzipping(data); 110 zip_file_ = internal::PrepareMemoryForUnzipping(data);
111 if (!zip_file_) 111 if (!zip_file_)
112 return false; 112 return false;
113 return OpenInternal(); 113 return OpenInternal();
114 } 114 }
115 115
116 void ZipReader::Close() { 116 void ZipReader::Close() {
117 if (zip_file_) { 117 if (zip_file_) {
118 unzClose(zip_file_); 118 unzClose(zip_file_);
119 } 119 }
120 Reset(); 120 Reset();
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 success_callback, 404 success_callback,
405 failure_callback, 405 failure_callback,
406 progress_callback, 406 progress_callback,
407 current_progress)); 407 current_progress));
408 408
409 } 409 }
410 } 410 }
411 411
412 412
413 } // namespace zip 413 } // namespace zip
OLDNEW
« third_party/zlib/google/zip_internal.h ('K') | « third_party/zlib/google/zip_internal.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698