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

Side by Side Diff: chrome/common/safe_browsing/zip_analyzer.cc

Issue 13257004: [components] Make zip a component so that src/chromeos can use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DEPS, OWNERS Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/unpacker.cc ('k') | chrome/common/zip.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 "chrome/common/safe_browsing/zip_analyzer.h" 5 #include "chrome/common/safe_browsing/zip_analyzer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/common/safe_browsing/download_protection_util.h" 8 #include "chrome/common/safe_browsing/download_protection_util.h"
9 #include "chrome/common/zip_reader.h" 9 #include "components/zip/zip_reader.h"
10 10
11 namespace safe_browsing { 11 namespace safe_browsing {
12 namespace zip_analyzer { 12 namespace zip_analyzer {
13 13
14 void AnalyzeZipFile(base::PlatformFile zip_file, Results* results) { 14 void AnalyzeZipFile(base::PlatformFile zip_file, Results* results) {
15 zip::ZipReader reader; 15 zip::ZipReader reader;
16 if (!reader.OpenFromPlatformFile(zip_file)) { 16 if (!reader.OpenFromPlatformFile(zip_file)) {
17 VLOG(1) << "Failed to open zip file"; 17 VLOG(1) << "Failed to open zip file";
18 return; 18 return;
19 } 19 }
(...skipping 16 matching lines...) Expand all
36 } 36 }
37 } else { 37 } else {
38 VLOG(3) << "Ignoring non-binary file: " << file.value(); 38 VLOG(3) << "Ignoring non-binary file: " << file.value();
39 } 39 }
40 } 40 }
41 results->success = true; 41 results->success = true;
42 } 42 }
43 43
44 } // namespace zip_analyzer 44 } // namespace zip_analyzer
45 } // namespace safe_browsing 45 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/common/extensions/unpacker.cc ('k') | chrome/common/zip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698