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 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_HELPERS_H_ | 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_HELPERS_H_ |
6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_HELPERS_H_ | 6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_HELPERS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // Create a MIME boundary marker (27 '-' characters followed by 16 hex digits). | 50 // Create a MIME boundary marker (27 '-' characters followed by 16 hex digits). |
51 static void CreateMimeBoundaryForUpload(std::string *out); | 51 static void CreateMimeBoundaryForUpload(std::string *out); |
52 // Generates an MD5 hash of the contents of a string map. | 52 // Generates an MD5 hash of the contents of a string map. |
53 static std::string GenerateHashOfStringMap( | 53 static std::string GenerateHashOfStringMap( |
54 const std::map<std::string, std::string>& string_map); | 54 const std::map<std::string, std::string>& string_map); |
55 static void GenerateMultipartPostDataForPrinterTags( | 55 static void GenerateMultipartPostDataForPrinterTags( |
56 const std::map<std::string, std::string>& printer_tags, | 56 const std::map<std::string, std::string>& printer_tags, |
57 const std::string& mime_boundary, | 57 const std::string& mime_boundary, |
58 std::string* post_data); | 58 std::string* post_data); |
59 | 59 |
| 60 // Returns true is tags indicate a dry run (test) job. |
| 61 static bool IsDryRunJob(const std::vector<std::string>& tags); |
60 private: | 62 private: |
61 CloudPrintHelpers() { | 63 CloudPrintHelpers() { |
62 } | 64 } |
63 }; | 65 }; |
64 | 66 |
65 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_HELPERS_H_ | 67 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_HELPERS_H_ |
66 | 68 |
OLD | NEW |