Bug 1035439 - Part 3: Use selected tab private state in openUrlAndStopEditing. r=margaret
authorBrian Nicholson <bnicholson@mozilla.com>
Mon, 14 Jul 2014 17:21:14 -0700
changeset 216008 36cb524c546a16e20b3bc8f94c20b989fec66730
parent 216007 81c71f117c6a83c7a38c60c2cd42eb2ca183b7a9
child 216009 420209cd2a0a7d7cffa9ee7a496fc8cc334e808f
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1035439
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1035439 - Part 3: Use selected tab private state in openUrlAndStopEditing. r=margaret
mobile/android/base/BrowserApp.java
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -1605,16 +1605,19 @@ public class BrowserApp extends GeckoApp
     private void openUrlAndStopEditing(String url, String searchEngine) {
         openUrlAndStopEditing(url, searchEngine, false);
     }
 
     private void openUrlAndStopEditing(String url, String searchEngine, boolean newTab) {
         int flags = Tabs.LOADURL_NONE;
         if (newTab) {
             flags |= Tabs.LOADURL_NEW_TAB;
+            if (Tabs.getInstance().getSelectedTab().isPrivate()) {
+                flags |= Tabs.LOADURL_PRIVATE;
+            }
         }
 
         Tabs.getInstance().loadUrl(url, searchEngine, -1, flags);
 
         mBrowserToolbar.cancelEdit();
     }
 
     private boolean isHomePagerVisible() {