OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 std::string(), post_data); | 224 std::string(), post_data); |
225 } | 225 } |
226 std::string tags_hash = MD5String(tags_list); | 226 std::string tags_hash = MD5String(tags_list); |
227 std::string tags_hash_msg(kTagsHashTagName); | 227 std::string tags_hash_msg(kTagsHashTagName); |
228 tags_hash_msg += "="; | 228 tags_hash_msg += "="; |
229 tags_hash_msg += tags_hash; | 229 tags_hash_msg += tags_hash; |
230 AddMultipartValueForUpload(kPrinterTagValue, tags_hash_msg, mime_boundary, | 230 AddMultipartValueForUpload(kPrinterTagValue, tags_hash_msg, mime_boundary, |
231 std::string(), post_data); | 231 std::string(), post_data); |
232 } | 232 } |
233 | 233 |
| 234 bool CloudPrintHelpers::IsDryRunJob(const std::vector<std::string>& tags) { |
| 235 std::vector<std::string>::const_iterator it; |
| 236 for (it = tags.begin(); it != tags.end(); ++it) { |
| 237 if (*it == kTagDryRunFlag) |
| 238 return true; |
| 239 } |
| 240 return false; |
| 241 } |
OLD | NEW |