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

Side by Side Diff: chrome/tools/pbl_tool/pbl_tool.cc

Issue 173357: Error diagnostics for Blacklist IO... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This tool manages privacy blacklists. Primarily for loading a text 5 // This tool manages privacy blacklists. Primarily for loading a text
6 // blacklist into the binary aggregate blacklist. 6 // blacklist into the binary aggregate blacklist.
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 26 matching lines...) Expand all
37 int IMAIN(int argc, ICHAR* argv[]) { 37 int IMAIN(int argc, ICHAR* argv[]) {
38 base::EnableTerminationOnHeapCorruption(); 38 base::EnableTerminationOnHeapCorruption();
39 39
40 if (argc < 3) 40 if (argc < 3)
41 return PrintUsage(argc, argv); 41 return PrintUsage(argc, argv);
42 42
43 BlacklistIO io; 43 BlacklistIO io;
44 for (int current = 1; current < argc-1; ++current) { 44 for (int current = 1; current < argc-1; ++current) {
45 FilePath input(argv[current]); 45 FilePath input(argv[current]);
46 if (!io.Read(input)) { 46 if (!io.Read(input)) {
47 ICERR << "Error reading input file " << argv[current] << "\n"; 47 ICERR << "Error reading " << argv[current] << ":\n"
48 << io.last_error() << "\n";
48 return -1; 49 return -1;
49 } 50 }
50 } 51 }
51 52
52 FilePath output(argv[argc-1]); 53 FilePath output(argv[argc-1]);
53 if (!io.Write(output)) 54 if (!io.Write(output))
54 ICERR << "Error writing output file " << argv[2] << "\n"; 55 ICERR << "Error writing " << argv[2] << ":\n" << io.last_error() << "\n";
55 56
56 return 0; 57 return 0;
57 } 58 }
OLDNEW
« chrome/browser/privacy_blacklist/blacklist_store.cc ('K') | « chrome/chrome.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698