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

Side by Side Diff: chrome/service/cloud_print/print_system_win.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « chrome/installer/util/master_preferences.cc ('k') | chrome/test/base/module_system_test.cc » ('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/service/cloud_print/print_system.h" 5 #include "chrome/service/cloud_print/print_system.h"
6 6
7 #include <objidl.h> 7 #include <objidl.h>
8 #include <winspool.h> 8 #include <winspool.h>
9 #include <xpsprint.h> 9 #include <xpsprint.h>
10 10
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 ULONG print_bytes_written = 0; 633 ULONG print_bytes_written = 0;
634 if (FAILED(print_ticket_stream->Write(print_ticket.c_str(), 634 if (FAILED(print_ticket_stream->Write(print_ticket.c_str(),
635 print_ticket.length(), 635 print_ticket.length(),
636 &print_bytes_written))) 636 &print_bytes_written)))
637 return false; 637 return false;
638 DCHECK_EQ(print_ticket.length(), print_bytes_written); 638 DCHECK_EQ(print_ticket.length(), print_bytes_written);
639 if (FAILED(print_ticket_stream->Close())) 639 if (FAILED(print_ticket_stream->Close()))
640 return false; 640 return false;
641 641
642 std::string document_data; 642 std::string document_data;
643 file_util::ReadFileToString(print_data_file_path, &document_data); 643 base::ReadFileToString(print_data_file_path, &document_data);
644 ULONG doc_bytes_written = 0; 644 ULONG doc_bytes_written = 0;
645 if (FAILED(doc_stream->Write(document_data.c_str(), 645 if (FAILED(doc_stream->Write(document_data.c_str(),
646 document_data.length(), 646 document_data.length(),
647 &doc_bytes_written))) 647 &doc_bytes_written)))
648 return false; 648 return false;
649 DCHECK_EQ(document_data.length(), doc_bytes_written); 649 DCHECK_EQ(document_data.length(), doc_bytes_written);
650 if (FAILED(doc_stream->Close())) 650 if (FAILED(doc_stream->Close()))
651 return false; 651 return false;
652 652
653 job_progress_watcher_.StartWatching(job_progress_event_.Get(), this); 653 job_progress_watcher_.StartWatching(job_progress_event_.Get(), this);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 return "application/pdf"; 897 return "application/pdf";
898 } 898 }
899 899
900 900
901 scoped_refptr<PrintSystem> PrintSystem::CreateInstance( 901 scoped_refptr<PrintSystem> PrintSystem::CreateInstance(
902 const base::DictionaryValue* print_system_settings) { 902 const base::DictionaryValue* print_system_settings) {
903 return new PrintSystemWin; 903 return new PrintSystemWin;
904 } 904 }
905 905
906 } // namespace cloud_print 906 } // namespace cloud_print
OLDNEW
« no previous file with comments | « chrome/installer/util/master_preferences.cc ('k') | chrome/test/base/module_system_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698