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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/omaha/RequestGenerator.java

Issue 1592403002: update obsolete code.google.com documentation links (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 10 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 package org.chromium.chrome.browser.omaha; 5 package org.chromium.chrome.browser.omaha;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.Build; 8 import android.os.Build;
9 import android.util.Xml; 9 import android.util.Xml;
10 10
(...skipping 29 matching lines...) Expand all
40 long currentTimestamp, long installTimestamp, boolean sendInstallEve nt) { 40 long currentTimestamp, long installTimestamp, boolean sendInstallEve nt) {
41 if (sendInstallEvent) { 41 if (sendInstallEvent) {
42 return INSTALL_AGE_IMMEDIATELY_AFTER_INSTALLING; 42 return INSTALL_AGE_IMMEDIATELY_AFTER_INSTALLING;
43 } else { 43 } else {
44 return Math.max(0L, (currentTimestamp - installTimestamp) / MS_PER_D AY); 44 return Math.max(0L, (currentTimestamp - installTimestamp) / MS_PER_D AY);
45 } 45 }
46 } 46 }
47 47
48 /** 48 /**
49 * Generates the XML for the current request. 49 * Generates the XML for the current request.
50 * Follows the format laid out at http://code.google.com/p/omaha/wiki/Server Protocol 50 * Follows the format laid out at https://github.com/google/omaha/blob/wiki/ ServerProtocolV3.md
51 * with some additional dummy values supplied. 51 * with some additional dummy values supplied.
52 */ 52 */
53 public String generateXML(String sessionID, String versionName, long install Age, 53 public String generateXML(String sessionID, String versionName, long install Age,
54 RequestData data) throws RequestFailureException { 54 RequestData data) throws RequestFailureException {
55 XmlSerializer serializer = Xml.newSerializer(); 55 XmlSerializer serializer = Xml.newSerializer();
56 StringWriter writer = new StringWriter(); 56 StringWriter writer = new StringWriter();
57 try { 57 try {
58 serializer.setOutput(writer); 58 serializer.setOutput(writer);
59 serializer.startDocument("UTF-8", true); 59 serializer.startDocument("UTF-8", true);
60 60
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 /** Returns the brand code. If one can't be retrieved, return "". */ 172 /** Returns the brand code. If one can't be retrieved, return "". */
173 protected abstract String getBrand(); 173 protected abstract String getBrand();
174 174
175 /** Returns the current client ID. */ 175 /** Returns the current client ID. */
176 protected abstract String getClient(); 176 protected abstract String getClient();
177 177
178 /** URL for the Omaha server. */ 178 /** URL for the Omaha server. */
179 public abstract String getServerUrl(); 179 public abstract String getServerUrl();
180 } 180 }
OLDNEW
« no previous file with comments | « build/util/lib/common/unittest_util.py ('k') | chrome/browser/password_manager/password_store_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698