Bug 1145192 - Don't spam the logs when retrieving the profile on Android. r=snorp
authorDylan Roeh <droeh@mozilla.com>
Wed, 01 Jul 2015 15:41:30 -0700
changeset 251121 bd08740485d0fc20513083e39f7ae2b0531649f5
parent 251120 67a4133bc5dbe5ce8a5b59524bafee03f4bbaf7d
child 251122 2e72154c2c40290db116d28d3d1abc29a6e99365
push id13830
push userryanvm@gmail.com
push dateThu, 02 Jul 2015 17:58:38 +0000
treeherderfx-team@663108a1d580 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1145192
milestone42.0a1
Bug 1145192 - Don't spam the logs when retrieving the profile on Android. r=snorp
mobile/android/base/GeckoProfile.java
--- a/mobile/android/base/GeckoProfile.java
+++ b/mobile/android/base/GeckoProfile.java
@@ -235,30 +235,31 @@ public final class GeckoProfile {
         }
         return GeckoProfile.get(context, profileName, profileDir, sDBFactory);
     }
 
     // Note that the profile cache respects only the profile name!
     // If the directory changes, the returned GeckoProfile instance will be mutated.
     // If the factory differs, it will be *ignored*.
     public static GeckoProfile get(Context context, String profileName, File profileDir, BrowserDB.Factory dbFactory) {
-        Log.v(LOGTAG, "Fetching profile: '" + profileName + "', '" + profileDir + "'");
         if (context == null) {
             throw new IllegalArgumentException("context must be non-null");
         }
 
         // If no profile was passed in, look for the default profile listed in profiles.ini.
         // If that doesn't exist, look for a profile called 'default'.
         if (TextUtils.isEmpty(profileName) && profileDir == null) {
             try {
                 profileName = GeckoProfile.getDefaultProfileName(context);
             } catch (NoMozillaDirectoryException e) {
                 // We're unable to do anything sane here.
                 throw new RuntimeException(e);
             }
+        } else {
+            Log.v(LOGTAG, "Fetching profile: '" + profileName + "', '" + profileDir + "'");
         }
 
         // Actually try to look up the profile.
         synchronized (sProfileCache) {
             GeckoProfile profile = sProfileCache.get(profileName);
             if (profile == null) {
                 try {
                     profile = new GeckoProfile(context, profileName, profileDir, dbFactory);