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.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 (queuedTabCount > 1) {
|
||||
@ -3377,7 +3377,7 @@ public class BrowserApp extends GeckoApp
|
||||
|
||||
charEncoding.setVisible(GeckoPreferences.getCharEncodingState());
|
||||
|
||||
if (mProfile.inGuestMode()) {
|
||||
if (getProfile().inGuestMode()) {
|
||||
exitGuestMode.setVisible(true);
|
||||
} else {
|
||||
enterGuestMode.setVisible(true);
|
||||
|
@ -175,7 +175,6 @@ public abstract class GeckoApp
|
||||
public List<GeckoAppShell.AppStateListener> mAppStateListeners = new LinkedList<GeckoAppShell.AppStateListener>();
|
||||
protected MenuPanel mMenuPanel;
|
||||
protected Menu mMenu;
|
||||
protected GeckoProfile mProfile;
|
||||
protected boolean mIsRestoringActivity;
|
||||
|
||||
private ContactService mContactService;
|
||||
@ -718,7 +717,7 @@ public abstract class GeckoApp
|
||||
return;
|
||||
}
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
@ -1631,7 +1630,7 @@ public abstract class GeckoApp
|
||||
}
|
||||
}
|
||||
}, "Tabs:TabsOpened");
|
||||
TabQueueHelper.openQueuedUrls(GeckoApp.this, mProfile, TabQueueHelper.FILE_NAME, true);
|
||||
TabQueueHelper.openQueuedUrls(GeckoApp.this, getProfile(), TabQueueHelper.FILE_NAME, true);
|
||||
} else {
|
||||
openTabsRunnable.run();
|
||||
}
|
||||
@ -1702,12 +1701,8 @@ public abstract class GeckoApp
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized GeckoProfile getProfile() {
|
||||
// fall back to default profile if we didn't load a specific one
|
||||
if (mProfile == null) {
|
||||
mProfile = GeckoProfile.get(this);
|
||||
}
|
||||
return mProfile;
|
||||
public GeckoProfile getProfile() {
|
||||
return GeckoThread.getActiveProfile();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user