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

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

Issue 10540003: Move guid generation from chrome/common/ to base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: installer Created 8 years, 6 months 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/guid.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/common/cloud_print/cloud_print_helpers.h" 5 #include "chrome/common/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/logging.h" 8 #include "base/logging.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/stringprintf.h" 11 #include "base/stringprintf.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/common/guid.h"
14 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
15 14
16 namespace cloud_print { 15 namespace cloud_print {
17 16
18 const char kPrinterListValue[] = "printers"; 17 const char kPrinterListValue[] = "printers";
19 const char kSuccessValue[] = "success"; 18 const char kSuccessValue[] = "success";
20 19
21 // Certain cloud print requests require Chrome's X-CloudPrint-Proxy header. 20 // Certain cloud print requests require Chrome's X-CloudPrint-Proxy header.
22 const char kChromeCloudPrintProxyHeader[] = "X-CloudPrint-Proxy: Chrome"; 21 const char kChromeCloudPrintProxyHeader[] = "X-CloudPrint-Proxy: Chrome";
23 22
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 84 }
86 85
87 // Create a MIME boundary marker (27 '-' characters followed by 16 hex digits). 86 // Create a MIME boundary marker (27 '-' characters followed by 16 hex digits).
88 void CreateMimeBoundaryForUpload(std::string* out) { 87 void CreateMimeBoundaryForUpload(std::string* out) {
89 int r1 = base::RandInt(0, kint32max); 88 int r1 = base::RandInt(0, kint32max);
90 int r2 = base::RandInt(0, kint32max); 89 int r2 = base::RandInt(0, kint32max);
91 base::SStringPrintf(out, "---------------------------%08X%08X", r1, r2); 90 base::SStringPrintf(out, "---------------------------%08X%08X", r1, r2);
92 } 91 }
93 92
94 } // namespace cloud_print 93 } // namespace cloud_print
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/guid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698