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

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

Issue 11360151: Move common cloud print methods from service/cloud_print to common/cloud_print. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Constant defines used in the cloud print proxy code 5 #include "chrome/common/cloud_print/cloud_print_constants.h"
6 6
7 #include "chrome/service/cloud_print/cloud_print_consts.h" 7 namespace cloud_print {
8
9 const char kCloudPrintUserAgent[] = "GoogleCloudPrintProxy";
10 const char kChromeCloudPrintProxyHeader[] = "X-CloudPrint-Proxy: Chrome";
11 const char kCloudPrintGaiaServiceId[] = "cloudprint";
12 const char kProxyAuthUserAgent[] = "ChromiumBrowser";
13 const char kCloudPrintPushNotificationsSource[] = "cloudprint.google.com";
8 14
9 const char kProxyIdValue[] = "proxy"; 15 const char kProxyIdValue[] = "proxy";
10 const char kPrinterNameValue[] = "printer"; 16 const char kPrinterNameValue[] = "printer";
11 const char kPrinterDescValue[] = "description"; 17 const char kPrinterDescValue[] = "description";
12 const char kPrinterCapsValue[] = "capabilities"; 18 const char kPrinterCapsValue[] = "capabilities";
13 const char kPrinterDefaultsValue[] = "defaults"; 19 const char kPrinterDefaultsValue[] = "defaults";
14 const char kPrinterStatusValue[] = "status"; 20 const char kPrinterStatusValue[] = "status";
15 const char kPrinterTagValue[] = "tag"; 21 const char kPrinterTagValue[] = "tag";
16 const char kPrinterRemoveTagValue[] = "remove_tag"; 22 const char kPrinterRemoveTagValue[] = "remove_tag";
17 const char kMessageTextValue[] = "message"; 23 const char kMessageTextValue[] = "message";
18 24
19 // Values in the respone JSON from the cloud print server 25 const char kPrintSystemFailedMessageId[] = "printsystemfail";
26 const char kGetPrinterCapsFailedMessageId[] = "getprncapsfail";
27 const char kEnumPrintersFailedMessageId[] = "enumfail";
28 const char kZombiePrinterMessageId[] = "zombieprinter";
29
30 const char kSuccessValue[] = "success";
20 const char kNameValue[] = "name"; 31 const char kNameValue[] = "name";
21 const char kIdValue[] = "id"; 32 const char kIdValue[] = "id";
22 const char kTicketUrlValue[] = "ticketUrl"; 33 const char kTicketUrlValue[] = "ticketUrl";
23 const char kFileUrlValue[] = "fileUrl"; 34 const char kFileUrlValue[] = "fileUrl";
35 const char kPrinterListValue[] = "printers";
24 const char kJobListValue[] = "jobs"; 36 const char kJobListValue[] = "jobs";
25 const char kTitleValue[] = "title"; 37 const char kTitleValue[] = "title";
26 const char kPrinterCapsHashValue[] = "capsHash"; 38 const char kPrinterCapsHashValue[] = "capsHash";
27 const char kTagsValue[] = "tags"; 39 const char kTagsValue[] = "tags";
28 const char kXMPPJidValue[] = "xmpp_jid"; 40 const char kXMPPJidValue[] = "xmpp_jid";
29 const char kOAuthCodeValue[] = "authorization_code"; 41 const char kOAuthCodeValue[] = "authorization_code";
42 const char kCreateTimeValue[] = "createTime";
43 const char kPrinterTypeValue[] = "type";
30 44
31 const char kProxyTagPrefix[] = "__cp__";
32 const char kTagsHashTagName[] = "__cp__tagshash";
33 const char kTagDryRunFlag[] = "__cp__dry_run";
34 // Don't need prefixes. They will be added on submit.
35 const char kChromeVersionTagName[] = "chrome_version"; 45 const char kChromeVersionTagName[] = "chrome_version";
36 const char kSystemNameTagName[] = "system_name"; 46 const char kSystemNameTagName[] = "system_name";
37 const char kSystemVersionTagName[] = "system_version"; 47 const char kSystemVersionTagName[] = "system_version";
38 48
39 extern const char kChromeVersionTagName[]; 49 const char kCloudPrintServiceProxyTagPrefix[] = "__cp__";
40 extern const char kOsTagName[]; 50 const char kCloudPrintServiceTagsHashTagName[] = "__cp__tagshash";
51 const char kCloudPrintServiceTagDryRunFlag[] = "__cp__dry_run";
41 52
42 const char kCloudPrintGaiaServiceId[] = "cloudprint";
43 const char kProxyAuthUserAgent[] = "ChromiumBrowser";
44 const char kCloudPrintPushNotificationsSource[] = "cloudprint.google.com";
45
46 // The string to be appended to the user-agent for cloudprint requests.
47 const char kCloudPrintUserAgent[] = "GoogleCloudPrintProxy";
48
49 // Reasons for fetching print jobs.
50 // Job fetch on proxy startup.
51 const char kJobFetchReasonStartup[] = "startup"; 53 const char kJobFetchReasonStartup[] = "startup";
52 // Job fetch because we are polling.
53 const char kJobFetchReasonPoll[] = "poll"; 54 const char kJobFetchReasonPoll[] = "poll";
54 // Job fetch on being notified by the server.
55 const char kJobFetchReasonNotified[] = "notified"; 55 const char kJobFetchReasonNotified[] = "notified";
56 // Job fetch after a successful print to query for more jobs.
57 const char kJobFetchReasonQueryMore[] = "querymore"; 56 const char kJobFetchReasonQueryMore[] = "querymore";
58 57
59 // Short message ids for diagnostic messages sent to the server. 58 } // namespace cloud_print
60 const char kPrintSystemFailedMessageId[] = "printsystemfail"; 59
61 const char kGetPrinterCapsFailedMessageId[] = "getprncapsfail";
62 const char kEnumPrintersFailedMessageId[] = "enumfail";
63 const char kZombiePrinterMessageId[] = "zombieprinter";
OLDNEW
« no previous file with comments | « chrome/common/cloud_print/cloud_print_constants.h ('k') | chrome/common/cloud_print/cloud_print_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698