| 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" | 13 #include "base/task.h" |
| 14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "chrome/service/cloud_print/cloud_print_consts.h" | 16 #include "chrome/service/cloud_print/cloud_print_consts.h" |
| 17 #include "chrome/service/service_process.h" | 17 #include "chrome/service/service_process.h" |
| 18 #include "content/common/net/url_fetcher.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: |
| 24 ret = "in_progress"; | 23 ret = "in_progress"; |
| 25 break; | 24 break; |
| 26 case cloud_print::PRINT_JOB_STATUS_ERROR: | 25 case cloud_print::PRINT_JOB_STATUS_ERROR: |
| 27 ret = "error"; | 26 ret = "error"; |
| 28 break; | 27 break; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 } | 259 } |
| 261 | 260 |
| 262 bool CloudPrintHelpers::IsDryRunJob(const std::vector<std::string>& tags) { | 261 bool CloudPrintHelpers::IsDryRunJob(const std::vector<std::string>& tags) { |
| 263 std::vector<std::string>::const_iterator it; | 262 std::vector<std::string>::const_iterator it; |
| 264 for (it = tags.begin(); it != tags.end(); ++it) { | 263 for (it = tags.begin(); it != tags.end(); ++it) { |
| 265 if (*it == kTagDryRunFlag) | 264 if (*it == kTagDryRunFlag) |
| 266 return true; | 265 return true; |
| 267 } | 266 } |
| 268 return false; | 267 return false; |
| 269 } | 268 } |
| OLD | NEW |