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

Side by Side Diff: build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java

Issue 2059143002: "up-to-date" should only use hyphens when used as compound modifier of a noun (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
« no previous file with comments | « build/android/AndroidManifest.xml ('k') | build/install-build-deps.sh » ('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 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.incrementalinstall; 5 package org.chromium.incrementalinstall;
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.Log; 9 import android.util.Log;
10 10
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // No need to delete stale libs since libraries are loaded explicitly. 174 // No need to delete stale libs since libraries are loaded explicitly.
175 int numNotChanged = 0; 175 int numNotChanged = 0;
176 for (File f : srcDir.listFiles()) { 176 for (File f : srcDir.listFiles()) {
177 // Note: Tried using hardlinks, but resulted in EACCES exceptions. 177 // Note: Tried using hardlinks, but resulted in EACCES exceptions.
178 File dest = new File(dstDir, f.getName()); 178 File dest = new File(dstDir, f.getName());
179 if (!copyIfModified(f, dest)) { 179 if (!copyIfModified(f, dest)) {
180 numNotChanged++; 180 numNotChanged++;
181 } 181 }
182 } 182 }
183 if (numNotChanged > 0) { 183 if (numNotChanged > 0) {
184 Log.i(TAG, numNotChanged + " libs already up-to-date."); 184 Log.i(TAG, numNotChanged + " libs already up to date.");
185 } 185 }
186 } 186 }
187 187
188 private static boolean copyIfModified(File src, File dest) throws IOExceptio n { 188 private static boolean copyIfModified(File src, File dest) throws IOExceptio n {
189 long lastModified = src.lastModified(); 189 long lastModified = src.lastModified();
190 if (dest.exists() && dest.lastModified() == lastModified) { 190 if (dest.exists() && dest.lastModified() == lastModified) {
191 return false; 191 return false;
192 } 192 }
193 Log.i(TAG, "Copying " + src + " -> " + dest); 193 Log.i(TAG, "Copying " + src + " -> " + dest);
194 FileInputStream istream = new FileInputStream(src); 194 FileInputStream istream = new FileInputStream(src);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 mClassLoader, ret); 238 mClassLoader, ret);
239 } else { 239 } else {
240 dexFile = Reflect.invokeMethod(clazz, "loadDexFile", file, optim izedDirectory); 240 dexFile = Reflect.invokeMethod(clazz, "loadDexFile", file, optim izedDirectory);
241 } 241 }
242 ret[curDexElements.length + i] = 242 ret[curDexElements.length + i] =
243 Reflect.newInstance(entryClazz, emptyDir, false, file, dexFi le); 243 Reflect.newInstance(entryClazz, emptyDir, false, file, dexFi le);
244 } 244 }
245 return ret; 245 return ret;
246 } 246 }
247 } 247 }
OLDNEW
« no previous file with comments | « build/android/AndroidManifest.xml ('k') | build/install-build-deps.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698