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/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #endif | 74 #endif |
75 } | 75 } |
76 | 76 |
77 CloudPrintPrivateGetHostNameFunction::CloudPrintPrivateGetHostNameFunction() { | 77 CloudPrintPrivateGetHostNameFunction::CloudPrintPrivateGetHostNameFunction() { |
78 } | 78 } |
79 | 79 |
80 CloudPrintPrivateGetHostNameFunction::~CloudPrintPrivateGetHostNameFunction() { | 80 CloudPrintPrivateGetHostNameFunction::~CloudPrintPrivateGetHostNameFunction() { |
81 } | 81 } |
82 | 82 |
83 bool CloudPrintPrivateGetHostNameFunction::RunAsync() { | 83 bool CloudPrintPrivateGetHostNameFunction::RunAsync() { |
84 SetResult(base::MakeUnique<base::StringValue>( | 84 SetResult(base::MakeUnique<base::Value>( |
85 CloudPrintTestsDelegate::Get() | 85 CloudPrintTestsDelegate::Get() |
86 ? CloudPrintTestsDelegate::Get()->GetHostName() | 86 ? CloudPrintTestsDelegate::Get()->GetHostName() |
87 : net::GetHostName())); | 87 : net::GetHostName())); |
88 SendResponse(true); | 88 SendResponse(true); |
89 return true; | 89 return true; |
90 } | 90 } |
91 | 91 |
92 CloudPrintPrivateGetPrintersFunction::CloudPrintPrivateGetPrintersFunction() { | 92 CloudPrintPrivateGetPrintersFunction::CloudPrintPrivateGetPrintersFunction() { |
93 } | 93 } |
94 | 94 |
(...skipping 27 matching lines...) Expand all Loading... |
122 } | 122 } |
123 | 123 |
124 | 124 |
125 CloudPrintPrivateGetClientIdFunction::CloudPrintPrivateGetClientIdFunction() { | 125 CloudPrintPrivateGetClientIdFunction::CloudPrintPrivateGetClientIdFunction() { |
126 } | 126 } |
127 | 127 |
128 CloudPrintPrivateGetClientIdFunction::~CloudPrintPrivateGetClientIdFunction() { | 128 CloudPrintPrivateGetClientIdFunction::~CloudPrintPrivateGetClientIdFunction() { |
129 } | 129 } |
130 | 130 |
131 bool CloudPrintPrivateGetClientIdFunction::RunAsync() { | 131 bool CloudPrintPrivateGetClientIdFunction::RunAsync() { |
132 SetResult(base::MakeUnique<base::StringValue>( | 132 SetResult(base::MakeUnique<base::Value>( |
133 CloudPrintTestsDelegate::Get() | 133 CloudPrintTestsDelegate::Get() |
134 ? CloudPrintTestsDelegate::Get()->GetClientId() | 134 ? CloudPrintTestsDelegate::Get()->GetClientId() |
135 : google_apis::GetOAuth2ClientID(google_apis::CLIENT_CLOUD_PRINT))); | 135 : google_apis::GetOAuth2ClientID(google_apis::CLIENT_CLOUD_PRINT))); |
136 SendResponse(true); | 136 SendResponse(true); |
137 return true; | 137 return true; |
138 } | 138 } |
139 | 139 |
140 } // namespace extensions | 140 } // namespace extensions |
OLD | NEW |