mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1258554 - Remove GeckoApp.mProfile; r=margaret
GeckoApp should not be caching the current profile.
This commit is contained in:
parent
97eeab23f1
commit
29cda83fe1
@ -999,7 +999,7 @@ public class BrowserApp extends GeckoApp
|
|||||||
Telemetry.addToHistogram("FENNEC_TABQUEUE_QUEUESIZE", queuedTabCount);
|
Telemetry.addToHistogram("FENNEC_TABQUEUE_QUEUESIZE", queuedTabCount);
|
||||||
Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.INTENT, "tabqueue-delayed");
|
Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.INTENT, "tabqueue-delayed");
|
||||||
|
|
||||||
TabQueueHelper.openQueuedUrls(BrowserApp.this, mProfile, TabQueueHelper.FILE_NAME, false);
|
TabQueueHelper.openQueuedUrls(BrowserApp.this, getProfile(), TabQueueHelper.FILE_NAME, false);
|
||||||
|
|
||||||
// If there's more than one tab then also show the tabs panel.
|
// If there's more than one tab then also show the tabs panel.
|
||||||
if (queuedTabCount > 1) {
|
if (queuedTabCount > 1) {
|
||||||
@ -3377,7 +3377,7 @@ public class BrowserApp extends GeckoApp
|
|||||||
|
|
||||||
charEncoding.setVisible(GeckoPreferences.getCharEncodingState());
|
charEncoding.setVisible(GeckoPreferences.getCharEncodingState());
|
||||||
|
|
||||||
if (mProfile.inGuestMode()) {
|
if (getProfile().inGuestMode()) {
|
||||||
exitGuestMode.setVisible(true);
|
exitGuestMode.setVisible(true);
|
||||||
} else {
|
} else {
|
||||||
enterGuestMode.setVisible(true);
|
enterGuestMode.setVisible(true);
|
||||||
|
@ -175,7 +175,6 @@ public abstract class GeckoApp
|
|||||||
public List<GeckoAppShell.AppStateListener> mAppStateListeners = new LinkedList<GeckoAppShell.AppStateListener>();
|
public List<GeckoAppShell.AppStateListener> mAppStateListeners = new LinkedList<GeckoAppShell.AppStateListener>();
|
||||||
protected MenuPanel mMenuPanel;
|
protected MenuPanel mMenuPanel;
|
||||||
protected Menu mMenu;
|
protected Menu mMenu;
|
||||||
protected GeckoProfile mProfile;
|
|
||||||
protected boolean mIsRestoringActivity;
|
protected boolean mIsRestoringActivity;
|
||||||
|
|
||||||
private ContactService mContactService;
|
private ContactService mContactService;
|
||||||
@ -718,7 +717,7 @@ public abstract class GeckoApp
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// We're on a background thread, so we can be synchronous.
|
// We're on a background thread, so we can be synchronous.
|
||||||
final long millis = mProfile.getDB().getPrePathLastVisitedTimeMilliseconds(getContentResolver(), prePath);
|
final long millis = getProfile().getDB().getPrePathLastVisitedTimeMilliseconds(getContentResolver(), prePath);
|
||||||
callback.sendSuccess(millis);
|
callback.sendSuccess(millis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1631,7 +1630,7 @@ public abstract class GeckoApp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, "Tabs:TabsOpened");
|
}, "Tabs:TabsOpened");
|
||||||
TabQueueHelper.openQueuedUrls(GeckoApp.this, mProfile, TabQueueHelper.FILE_NAME, true);
|
TabQueueHelper.openQueuedUrls(GeckoApp.this, getProfile(), TabQueueHelper.FILE_NAME, true);
|
||||||
} else {
|
} else {
|
||||||
openTabsRunnable.run();
|
openTabsRunnable.run();
|
||||||
}
|
}
|
||||||
@ -1702,12 +1701,8 @@ public abstract class GeckoApp
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized GeckoProfile getProfile() {
|
public GeckoProfile getProfile() {
|
||||||
// fall back to default profile if we didn't load a specific one
|
return GeckoThread.getActiveProfile();
|
||||||
if (mProfile == null) {
|
|
||||||
mProfile = GeckoProfile.get(this);
|
|
||||||
}
|
|
||||||
return mProfile;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user