Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: chrome/service/cloud_print/cloud_print_helpers.cc

Issue 5736004: Added 'dry run' tag to the print job, to test proxy health without wasting pa... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_helpers.h ('k') | chrome/service/cloud_print/cloud_print_proxy_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698