OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/json/json_reader.h" | 6 #include "base/json/json_reader.h" |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "chrome/browser/local_discovery/privet_http_impl.h" | 9 #include "chrome/browser/local_discovery/privet_http_impl.h" |
10 #include "net/base/host_port_pair.h" | 10 #include "net/base/host_port_pair.h" |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 virtual void SetUp() override { | 791 virtual void SetUp() override { |
792 PrivetURLFetcher::ResetTokenMapForTests(); | 792 PrivetURLFetcher::ResetTokenMapForTests(); |
793 | 793 |
794 local_print_operation_ = privet_client_->CreateLocalPrintOperation( | 794 local_print_operation_ = privet_client_->CreateLocalPrintOperation( |
795 &local_print_delegate_); | 795 &local_print_delegate_); |
796 | 796 |
797 scoped_ptr<FakePWGRasterConverter> pwg_converter( | 797 scoped_ptr<FakePWGRasterConverter> pwg_converter( |
798 new FakePWGRasterConverter); | 798 new FakePWGRasterConverter); |
799 pwg_converter_ = pwg_converter.get(); | 799 pwg_converter_ = pwg_converter.get(); |
800 local_print_operation_->SetPWGRasterConverterForTesting( | 800 local_print_operation_->SetPWGRasterConverterForTesting( |
801 pwg_converter.PassAs<PWGRasterConverter>()); | 801 pwg_converter.Pass()); |
802 } | 802 } |
803 | 803 |
804 scoped_refptr<base::RefCountedBytes> RefCountedBytesFromString( | 804 scoped_refptr<base::RefCountedBytes> RefCountedBytesFromString( |
805 std::string str) { | 805 std::string str) { |
806 std::vector<unsigned char> str_vec; | 806 std::vector<unsigned char> str_vec; |
807 str_vec.insert(str_vec.begin(), str.begin(), str.end()); | 807 str_vec.insert(str_vec.begin(), str.begin(), str.end()); |
808 return scoped_refptr<base::RefCountedBytes>( | 808 return scoped_refptr<base::RefCountedBytes>( |
809 base::RefCountedBytes::TakeVector(&str_vec)); | 809 base::RefCountedBytes::TakeVector(&str_vec)); |
810 } | 810 } |
811 | 811 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 | 1073 |
1074 EXPECT_TRUE(SuccessfulResponseToURL( | 1074 EXPECT_TRUE(SuccessfulResponseToURL( |
1075 GURL("http://10.0.0.8:6006/privet/printer/createjob"), | 1075 GURL("http://10.0.0.8:6006/privet/printer/createjob"), |
1076 kSampleCreatejobResponse)); | 1076 kSampleCreatejobResponse)); |
1077 } | 1077 } |
1078 #endif // ENABLE_FULL_PRINTING | 1078 #endif // ENABLE_FULL_PRINTING |
1079 | 1079 |
1080 } // namespace | 1080 } // namespace |
1081 | 1081 |
1082 } // namespace local_discovery | 1082 } // namespace local_discovery |
OLD | NEW |