| OLD | NEW |
| 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/browser/extensions/api/cloud_print_private/cloud_print_private_
api.h" | 5 #include "chrome/browser/extensions/api/cloud_print_private/cloud_print_private_
api.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/threading/sequenced_worker_pool.h" | 9 #include "base/threading/sequenced_worker_pool.h" |
| 10 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 10 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 return true; | 62 return true; |
| 63 } | 63 } |
| 64 | 64 |
| 65 CloudPrintPrivateGetHostNameFunction::CloudPrintPrivateGetHostNameFunction() { | 65 CloudPrintPrivateGetHostNameFunction::CloudPrintPrivateGetHostNameFunction() { |
| 66 } | 66 } |
| 67 | 67 |
| 68 CloudPrintPrivateGetHostNameFunction::~CloudPrintPrivateGetHostNameFunction() { | 68 CloudPrintPrivateGetHostNameFunction::~CloudPrintPrivateGetHostNameFunction() { |
| 69 } | 69 } |
| 70 | 70 |
| 71 bool CloudPrintPrivateGetHostNameFunction::RunImpl() { | 71 bool CloudPrintPrivateGetHostNameFunction::RunImpl() { |
| 72 SetResult(Value::CreateStringValue( | 72 SetResult(new base::StringValue( |
| 73 CloudPrintTestsDelegate::instance() ? | 73 CloudPrintTestsDelegate::instance() ? |
| 74 CloudPrintTestsDelegate::instance()->GetHostName() : | 74 CloudPrintTestsDelegate::instance()->GetHostName() : |
| 75 net::GetHostName())); | 75 net::GetHostName())); |
| 76 SendResponse(true); | 76 SendResponse(true); |
| 77 return true; | 77 return true; |
| 78 } | 78 } |
| 79 | 79 |
| 80 CloudPrintPrivateGetPrintersFunction::CloudPrintPrivateGetPrintersFunction() { | 80 CloudPrintPrivateGetPrintersFunction::CloudPrintPrivateGetPrintersFunction() { |
| 81 } | 81 } |
| 82 | 82 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 104 } | 104 } |
| 105 | 105 |
| 106 | 106 |
| 107 CloudPrintPrivateGetClientIdFunction::CloudPrintPrivateGetClientIdFunction() { | 107 CloudPrintPrivateGetClientIdFunction::CloudPrintPrivateGetClientIdFunction() { |
| 108 } | 108 } |
| 109 | 109 |
| 110 CloudPrintPrivateGetClientIdFunction::~CloudPrintPrivateGetClientIdFunction() { | 110 CloudPrintPrivateGetClientIdFunction::~CloudPrintPrivateGetClientIdFunction() { |
| 111 } | 111 } |
| 112 | 112 |
| 113 bool CloudPrintPrivateGetClientIdFunction::RunImpl() { | 113 bool CloudPrintPrivateGetClientIdFunction::RunImpl() { |
| 114 SetResult(Value::CreateStringValue( | 114 SetResult(new base::StringValue( |
| 115 CloudPrintTestsDelegate::instance() ? | 115 CloudPrintTestsDelegate::instance() ? |
| 116 CloudPrintTestsDelegate::instance()->GetClientId() : | 116 CloudPrintTestsDelegate::instance()->GetClientId() : |
| 117 google_apis::GetOAuth2ClientID(google_apis::CLIENT_CLOUD_PRINT))); | 117 google_apis::GetOAuth2ClientID(google_apis::CLIENT_CLOUD_PRINT))); |
| 118 SendResponse(true); | 118 SendResponse(true); |
| 119 return true; | 119 return true; |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace extensions | 122 } // namespace extensions |
| OLD | NEW |