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

Unified Diff: content/public/android/java/src/org/chromium/content/app/UserAgent.java

Issue 10832235: Move Android user agent generation to native code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Nit fix Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_jni.gypi ('k') | webkit/glue/user_agent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/app/UserAgent.java
diff --git a/content/public/android/java/src/org/chromium/content/app/UserAgent.java b/content/public/android/java/src/org/chromium/content/app/UserAgent.java
deleted file mode 100644
index 36d328d4ebe6989d895aa08bf7670145cfe094f5..0000000000000000000000000000000000000000
--- a/content/public/android/java/src/org/chromium/content/app/UserAgent.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.content.app;
-
-import android.os.Build;
-
-import org.chromium.base.CalledByNative;
-
-/**
- * Provides necessary information for building the user agent string.
- */
-class UserAgent {
- // TODO(yfriedman): Keep this reasonably up to date.
- private static final String PREVIOUS_VERSION = "4.0.3";
-
- @CalledByNative
- static String getUserAgentOSInfo() {
- String osInfo = "";
- final String version = Build.VERSION.RELEASE;
- if (version.length() > 0) {
- if (Character.isDigit(version.charAt(0))) {
- // Release is a version, eg "3.1"
- osInfo += version;
- } else {
- // Release doesn't have a version number yet, eg "Honeycomb"
- // In this case, use the previous release's version
- osInfo += PREVIOUS_VERSION;
- }
- } else {
- // default to "1.0"
- osInfo += "1.0";
- }
- osInfo += ";";
-
- if ("REL".equals(Build.VERSION.CODENAME)) {
- final String model = Build.MODEL;
- if (model.length() > 0) {
- osInfo += " " + model;
- }
- }
- final String id = Build.ID;
- if (id.length() > 0) {
- osInfo += " Build/" + id;
- }
-
- return osInfo;
- }
-}
« no previous file with comments | « content/content_jni.gypi ('k') | webkit/glue/user_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698