Commit 74c1af57 authored by Rohit Agarwal's avatar Rohit Agarwal Committed by Commit Bot

Set IncognitoInterstitialDelegate methods access specifier to package

private.

The IncognitoInterstitialDelegate methods should be used in conjunction
with the IncognitoInterstitial MVC. Currently, it's possible to create
instance of the IncognitoInterstitialDelegate and invoke its methods
from outside of package scope.

This CL changes the scope of these methods to package private and moves
the IncognitoInterstitialDelegateTest to the same package.

Bug: 1103262
Change-Id: Id0a87b386e4f0c3414c744e5bd51da6f61bc9922
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2398480Reviewed-by: default avatarAlice Wang <aliceywang@chromium.org>
Reviewed-by: default avatarPeter Conn <peconn@chromium.org>
Commit-Queue: Rohit Agarwal <roagarwal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804973}
parent 87f50e55
...@@ -113,8 +113,8 @@ chrome_junit_test_java_sources = [ ...@@ -113,8 +113,8 @@ chrome_junit_test_java_sources = [
"junit/src/org/chromium/chrome/browser/image_fetcher/ImageFetcherTest.java", "junit/src/org/chromium/chrome/browser/image_fetcher/ImageFetcherTest.java",
"junit/src/org/chromium/chrome/browser/image_fetcher/InMemoryCachedImageFetcherTest.java", "junit/src/org/chromium/chrome/browser/image_fetcher/InMemoryCachedImageFetcherTest.java",
"junit/src/org/chromium/chrome/browser/image_fetcher/NetworkImageFetcherTest.java", "junit/src/org/chromium/chrome/browser/image_fetcher/NetworkImageFetcherTest.java",
"junit/src/org/chromium/chrome/browser/incognito/IncognitoInterstitialDelegateTest.java",
"junit/src/org/chromium/chrome/browser/incognito/IncognitoTabSnapshotControllerTest.java", "junit/src/org/chromium/chrome/browser/incognito/IncognitoTabSnapshotControllerTest.java",
"junit/src/org/chromium/chrome/browser/incognito/interstitial/IncognitoInterstitialDelegateTest.java",
"junit/src/org/chromium/chrome/browser/infobar/IPHInfoBarSupportTest.java", "junit/src/org/chromium/chrome/browser/infobar/IPHInfoBarSupportTest.java",
"junit/src/org/chromium/chrome/browser/init/AsyncInitTaskRunnerTest.java", "junit/src/org/chromium/chrome/browser/init/AsyncInitTaskRunnerTest.java",
"junit/src/org/chromium/chrome/browser/installedapp/PackageHashTest.java", "junit/src/org/chromium/chrome/browser/installedapp/PackageHashTest.java",
......
...@@ -37,7 +37,7 @@ public class IncognitoInterstitialDelegate { ...@@ -37,7 +37,7 @@ public class IncognitoInterstitialDelegate {
* Open the help centre article regarding Incognito usage. * Open the help centre article regarding Incognito usage.
*/ */
@MainThread @MainThread
public void openLearnMorePage() { void openLearnMorePage() {
ThreadUtils.assertOnUiThread(); ThreadUtils.assertOnUiThread();
mHelpAndFeedback.show(mActivity, mHelpAndFeedback.show(mActivity,
mActivity.getString(R.string.help_context_incognito_learn_more), mActivity.getString(R.string.help_context_incognito_learn_more),
...@@ -48,7 +48,7 @@ public class IncognitoInterstitialDelegate { ...@@ -48,7 +48,7 @@ public class IncognitoInterstitialDelegate {
* Navigates to |mCurrentUrl| in a new incognito tab. * Navigates to |mCurrentUrl| in a new incognito tab.
*/ */
@MainThread @MainThread
public void openCurrentUrlInIncognitoTab() { void openCurrentUrlInIncognitoTab() {
// TODO(https://crbug.com/1120334): Add metrics to web sign-in flow. // TODO(https://crbug.com/1120334): Add metrics to web sign-in flow.
ThreadUtils.assertOnUiThread(); ThreadUtils.assertOnUiThread();
mIncognitoTabCreator.launchUrl(mCurrentUrl, TabLaunchType.FROM_CHROME_UI); mIncognitoTabCreator.launchUrl(mCurrentUrl, TabLaunchType.FROM_CHROME_UI);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
package org.chromium.chrome.browser.incognito; package org.chromium.chrome.browser.incognito.interstitial;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
...@@ -21,7 +21,6 @@ import org.mockito.MockitoAnnotations; ...@@ -21,7 +21,6 @@ import org.mockito.MockitoAnnotations;
import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.BaseRobolectricTestRunner;
import org.chromium.chrome.R; import org.chromium.chrome.R;
import org.chromium.chrome.browser.help.HelpAndFeedback; import org.chromium.chrome.browser.help.HelpAndFeedback;
import org.chromium.chrome.browser.incognito.interstitial.IncognitoInterstitialDelegate;
import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.tab.TabLaunchType; import org.chromium.chrome.browser.tab.TabLaunchType;
import org.chromium.chrome.browser.tabmodel.TabCreator; import org.chromium.chrome.browser.tabmodel.TabCreator;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment