OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/cloud_print_helpers.h" | 5 #include "chrome/service/cloud_print/cloud_print_helpers.h" |
6 | 6 |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/md5.h" | 8 #include "base/md5.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
13 #include "base/task.h" | |
14 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
15 #include "base/values.h" | 14 #include "base/values.h" |
16 #include "chrome/service/cloud_print/cloud_print_consts.h" | 15 #include "chrome/service/cloud_print/cloud_print_consts.h" |
17 #include "chrome/service/cloud_print/cloud_print_token_store.h" | 16 #include "chrome/service/cloud_print/cloud_print_token_store.h" |
18 #include "chrome/service/service_process.h" | 17 #include "chrome/service/service_process.h" |
19 | 18 |
20 std::string StringFromJobStatus(cloud_print::PrintJobStatus status) { | 19 std::string StringFromJobStatus(cloud_print::PrintJobStatus status) { |
21 std::string ret; | 20 std::string ret; |
22 switch (status) { | 21 switch (status) { |
23 case cloud_print::PRINT_JOB_STATUS_IN_PROGRESS: | 22 case cloud_print::PRINT_JOB_STATUS_IN_PROGRESS: |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 LOG(ERROR) << "CP_PROXY: Missing OAuth token for request"; | 276 LOG(ERROR) << "CP_PROXY: Missing OAuth token for request"; |
278 } | 277 } |
279 | 278 |
280 if (token_store) { | 279 if (token_store) { |
281 header = "Authorization: OAuth "; | 280 header = "Authorization: OAuth "; |
282 header += token_store->token(); | 281 header += token_store->token(); |
283 } | 282 } |
284 return header; | 283 return header; |
285 } | 284 } |
286 | 285 |
OLD | NEW |