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 <utility> | 5 #include <utility> |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "chrome/browser/local_discovery/cloud_print_printer_list.h" | 8 #include "chrome/browser/local_discovery/cloud_print_printer_list.h" |
9 #include "chrome/common/cloud_print/cloud_print_constants.h" | 9 #include "chrome/common/cloud_print/cloud_print_constants.h" |
10 | 10 |
11 namespace local_discovery { | 11 namespace local_discovery { |
12 | 12 |
13 namespace { | 13 namespace { |
14 const char kPrinterListURLFormat[] = "%s/search"; | 14 const char kPrinterListURLFormat[] = "%s/search"; |
15 } | 15 } |
16 | 16 |
17 CloudPrintPrinterList::CloudPrintPrinterList( | 17 CloudPrintPrinterList::CloudPrintPrinterList( |
18 net::URLRequestContextGetter* request_context, | 18 net::URLRequestContextGetter* request_context, |
19 const std::string& cloud_print_url, | 19 const std::string& cloud_print_url, |
20 OAuth2TokenService* token_service, | 20 OAuth2TokenService* token_service, |
| 21 const std::string& account_id, |
21 Delegate* delegate) | 22 Delegate* delegate) |
22 : request_context_(request_context), | 23 : request_context_(request_context), |
23 url_(base::StringPrintf(kPrinterListURLFormat, cloud_print_url.c_str())), | 24 url_(base::StringPrintf(kPrinterListURLFormat, cloud_print_url.c_str())), |
24 delegate_(delegate), | 25 delegate_(delegate), |
25 api_flow_(request_context_, | 26 api_flow_(request_context_, |
26 token_service, | 27 token_service, |
| 28 account_id, |
27 url_, | 29 url_, |
28 this) { | 30 this) { |
29 } | 31 } |
30 | 32 |
31 | 33 |
32 CloudPrintPrinterList::~CloudPrintPrinterList() { | 34 CloudPrintPrinterList::~CloudPrintPrinterList() { |
33 } | 35 } |
34 | 36 |
35 void CloudPrintPrinterList::Start() { | 37 void CloudPrintPrinterList::Start() { |
36 api_flow_.Start(); | 38 api_flow_.Start(); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 return true; | 106 return true; |
105 } | 107 } |
106 | 108 |
107 CloudPrintPrinterList::PrinterDetails::PrinterDetails() { | 109 CloudPrintPrinterList::PrinterDetails::PrinterDetails() { |
108 } | 110 } |
109 | 111 |
110 CloudPrintPrinterList::PrinterDetails::~PrinterDetails() { | 112 CloudPrintPrinterList::PrinterDetails::~PrinterDetails() { |
111 } | 113 } |
112 | 114 |
113 } // namespace local_discovery | 115 } // namespace local_discovery |
OLD | NEW |