Skip to content

Commit

Permalink
Merge pull request #95 from devjangid15/chromium
Browse files Browse the repository at this point in the history
WootzApp UI Change
  • Loading branch information
pandey019 authored Jul 3, 2024
2 parents f60883b + 68dfe5d commit 104d54a
Show file tree
Hide file tree
Showing 226 changed files with 4,177 additions and 872 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<html>
<body>
</body>
<script src="prerender-test-setup.js"></script>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
HTTP/1.1 200 OK
No-Vary-Search: key-order, params, except=("a" "c")
27 changes: 27 additions & 0 deletions src/android_webview/test/data/prerender-test-setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Objects starting with the "aw" prefix are injected by AwPrerenderTest.

function createIframe(url) {
const iframe = document.createElement('iframe');
iframe.setAttribute('src', url);
document.body.appendChild(iframe);
}

function wasActivated() {
return self.performance?.getEntriesByType?.('navigation')[0]
?.activationStart > 0;
}

const wasPrerendered = document.prerendering || wasActivated();

if (wasActivated()) {
awActivationFuture.activated();
} else {
document.onprerenderingchange = () => awActivationFuture.activated();
}

// Notify the primary page that this prerendered page started.
window.localStorage.setItem('pageStarted', location.href);
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
export const FEEDBACK_LEGAL_HELP_URL =
'https://support.google.com/legal/answer/3110420';
export const FEEDBACK_PRIVACY_POLICY_URL =
'https://policies.google.com/privacy';
'https://www.wootzapp.com/privacy';
export const FEEDBACK_TERMS_OF_SERVICE_URL =
'https://policies.google.com/terms';
2 changes: 1 addition & 1 deletion src/chrome/android/chrome_java_resources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ chrome_java_resources = [
"java/res/values/strings.xml",
"java/res/values/styles.xml",
"java/res/values/values.xml",
"java/res/xml/about_chrome_preferences.xml",
"java/res/xml/about_wootzapp_preferences.xml",
"java/res/xml/account_management_preferences.xml",
"java/res/xml/ad_services_config.xml",
"java/res/xml/bookmark_widget_info.xml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public boolean performAction(List<Tab> tabs) {
R.dimen.tab_list_editor_share_sheet_preview_thumbnail_padding);
Drawable drawable =
new InsetDrawable(
AppCompatResources.getDrawable(context, R.drawable.chrome_sync_logo),
AppCompatResources.getDrawable(context, R.drawable.wootzapp_sync_logo),
(int) padding);

// Create a custom share intent and receiver to assess if another app receives the share
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ private boolean shouldShowSigninPromo() {
SyncPromoController.resetNtpSyncPromoLimitsIfHiddenForTooLong();
// TODO(crbug.com/41493776): Update the bottom sheet subtitle string.
AccountPickerBottomSheetStrings bottomSheetStrings =
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_chrome).build();
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_wootzapp).build();
SyncPromoController promoController =
new SyncPromoController(
mProfile,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ found in the LICENSE file.
android:id="@+id/radio_button_chrome_ntp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:primaryText="@string/options_homepage_chrome_homepage" />
app:primaryText="@string/options_homepage_wootzapp_homepage" />

<org.chromium.components.browser_ui.widget.RadioButtonWithEditText
android:id="@+id/radio_button_uri_edit"
Expand Down
7 changes: 7 additions & 0 deletions src/chrome/android/java/res/menu/main_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ found in the LICENSE file.
android:title="@string/accessibility_menu_bookmark"
android:titleCondensed="@string/menu_bookmark"
android:icon="@drawable/star_outline_24dp"/>





<item android:id="@+id/offline_page_id"
android:title="@string/download_page"
android:titleCondensed="@string/menu_download"
Expand All @@ -37,6 +42,8 @@ found in the LICENSE file.
android:icon="@drawable/btn_reload_stop"/>
</menu>
</item>


<item android:id="@+id/update_menu_id"
android:title="@string/menu_update"
android:icon="@drawable/menu_update" />
Expand Down
19 changes: 19 additions & 0 deletions src/chrome/android/java/res/xml/about_wootzapp_preferences.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2014 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<org.chromium.chrome.browser.about_settings.LongClickCopySummaryPreference
android:key="application_version"
android:title="@string/application_version_title" />
<org.chromium.chrome.browser.about_settings.AboutChromePreferenceOSVersion
android:key="os_version"
android:title="@string/os_version_title" />
<org.chromium.chrome.browser.about_settings.LongClickCopySummaryPreference
android:fragment="org.chromium.chrome.browser.about_settings.LegalInformationSettings"
android:key="legal_information"
android:title="@string/legal_information_title" />
</PreferenceScreen>
2 changes: 1 addition & 1 deletion src/chrome/android/java/res/xml/developer_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ found in the LICENSE file.
android:layout_height="wrap_content"
android:enabled="false"
android:key="beta_stable_hint"
android:title="Hint: You can also enable Developer options on Beta/Stable channels by tapping the Chrome version in &quot;Settings > About Chrome&quot; multiple times."
android:title="Hint: You can also enable Developer options on Beta/Stable channels by tapping the Chrome version in &quot;Settings > About WootzApp&quot; multiple times."
app:allowDividerAbove="false"
app:allowDividerBelow="false" />
</PreferenceScreen>
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ found in the LICENSE file.
xmlns:app="http://schemas.android.com/apk/res-auto">
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
android:key="allow_signin"
android:title="@string/allow_chrome_signin_title"
android:summary="@string/allow_chrome_signin_summary"
android:title="@string/allow_wootzapp_signin_title"
android:summary="@string/allow_wootzapp_signin_summary"
android:persistent="false"/>
<!-- Shown for some user states and hidden for others, so hide by default
to avoid flickering. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ found in the LICENSE file.
<org.chromium.chrome.browser.about_settings.HyperlinkPreference
android:key="privacy_policy"
android:title="@string/privacy_policy_title"
app:url="@string/google_privacy_policy_url" />
app:url="@string/wootzapp_privacy_policy_url" />
</PreferenceScreen>
4 changes: 2 additions & 2 deletions src/chrome/android/java/res/xml/main_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ found in the LICENSE file.
<org.chromium.chrome.browser.sync.settings.SignInPreference
android:key="sign_in"
android:order="2"
android:title="@string/sign_in_to_chrome"/>
android:title="@string/sign_in_to_wootzapp"/>
<org.chromium.components.browser_ui.settings.ChromeBasePreference
android:key="manage_sync"
android:order="3"
Expand Down Expand Up @@ -146,6 +146,6 @@ found in the LICENSE file.
android:fragment="org.chromium.chrome.browser.about_settings.AboutChromeSettings"
android:key="about_chrome"
android:order="27"
android:title="@string/prefs_about_chrome"/>
android:title="@string/prefs_about_wootzapp"/>

</PreferenceScreen>
Binary file modified src/chrome/android/java/res_chromium_base/mipmap-hdpi/app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/chrome/android/java/res_chromium_base/mipmap-mdpi/app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/chrome/android/java/res_chromium_base/mipmap-xhdpi/app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public class AboutChromeSettings extends PreferenceFragmentCompat

@Override
public void onCreatePreferences(Bundle bundle, String s) {
getActivity().setTitle(R.string.prefs_about_chrome);
SettingsUtils.addPreferencesFromResource(this, R.xml.about_chrome_preferences);
getActivity().setTitle(R.string.prefs_about_wootzapp);
SettingsUtils.addPreferencesFromResource(this, R.xml.about_wootzapp_preferences);

Preference p = findPreference(PREF_APPLICATION_VERSION);
p.setSummary(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.chromium.chrome.R;
import org.chromium.components.browser_ui.settings.SettingsUtils;

/** Fragment to display legal information about Chrome. */
/** Fragment to display legal information about WootzApp. */
public class LegalInformationSettings extends PreferenceFragmentCompat {
@Override
public void onCreatePreferences(Bundle savedInstanceState, String s) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class BookmarkPromoHeader
mAccountManagerFacade = AccountManagerFacadeProvider.getInstance();

AccountPickerBottomSheetStrings bottomSheetStrings =
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_chrome).build();
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_wootzapp).build();
SyncPromoController syncPromoController =
new SyncPromoController(
mProfile,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private void initializeViews(boolean hasChildAccount) {
(view) -> showInfoPage(R.string.chrome_additional_terms_of_service_url));
NoUnderlineClickableSpan clickableGooglePrivacySpan =
new NoUnderlineClickableSpan(
this, (view) -> showInfoPage(R.string.google_privacy_policy_url));
this, (view) -> showInfoPage(R.string.wootzapp_privacy_policy_url));
String associatedAppName =
IntentUtils.safeGetStringExtra(getIntent(), EXTRA_ASSOCIATED_APP_NAME);
if (associatedAppName == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public GURL getPrefHomepageCustomGurl() {
mSharedPreferencesManager.readString(
ChromePreferenceKeys.DEPRECATED_HOMEPAGE_CUSTOM_URI, "");
if (!homepageCustomUri.equals("")) {
GURL homepageCustomGurl = new GURL(homepageCustomUri);
GURL homepageCustomGurl = new GURL("wootzapp://rewards/");
if (homepageCustomGurl.isValid()) {
mSharedPreferencesManager.writeString(
ChromePreferenceKeys.HOMEPAGE_CUSTOM_GURL, homepageCustomGurl.serialize());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ void onClick() {
// TODO(crbug.com/41496906): Implement the new sign-in flow for automotive.
if (SigninUtils.shouldShowNewSigninFlow()) {
AccountPickerBottomSheetStrings bottomSheetStrings =
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_chrome)
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_wootzapp)
.setSubtitleStringId(
R.string
.signin_account_picker_bottom_sheet_benefits_subtitle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public RecentTabsManager(

mProfileDataCache = ProfileDataCache.createWithDefaultImageSizeAndNoBadge(context);
AccountPickerBottomSheetStrings bottomSheetStrings =
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_chrome).build();
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_wootzapp).build();
mSyncPromoController =
new SyncPromoController(
mProfile,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private void createPreferences() {

SyncPromoPreference syncPromoPreference = findPreference(PREF_SYNC_PROMO);
AccountPickerBottomSheetStrings bottomSheetStrings =
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_chrome).build();
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_wootzapp).build();
syncPromoPreference.initialize(
profileDataCache,
accountManagerFacade,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public final class SuggestionsConfig {
* It must be kept in sync with //components/feed/feed_feature_list.cc.
*/
private static final String DEFAULT_CONTENT_SUGGESTIONS_REFERRER_URL =
"https://www.google.com/";
"wootzapp://rewards/";

private SuggestionsConfig() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private void update() {

private void setupSigninDisabledByPolicy() {
setTitle(R.string.sync_promo_turn_on_sync);
setSummary(R.string.sign_in_to_chrome_disabled_summary);
setSummary(R.string.sign_in_to_wootzapp_disabled_summary);
setFragment(null);
setIcon(ManagedPreferencesUtils.getManagedByEnterpriseIconId());
setViewEnabledAndShowAlertIcon(/* enabled= */ false, /* alertIconVisible= */ false);
Expand Down Expand Up @@ -190,7 +190,7 @@ private void setupGenericPromo() {
ChromeFeatureList.REPLACE_SYNC_PROMOS_WITH_SIGN_IN_PROMOS)) {
AccountPickerBottomSheetStrings bottomSheetStrings =
new AccountPickerBottomSheetStrings.Builder(
R.string.sign_in_to_chrome)
R.string.sign_in_to_wootzapp)
.build();
SigninAndHistoryOptInActivityLauncherImpl.get()
.launchActivityIfAllowed(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class SigninAndHistoryOptInActivityLauncherImplTest {
new BaseActivityTestRule(BlankUiTestActivity.class);

private static final AccountPickerBottomSheetStrings BOTTOM_SHEET_STRINGS =
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_chrome).build();
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_wootzapp).build();

@Mock private Context mContextMock;
@Mock private IdentityServicesProvider mIdentityProviderMock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ private void launchActivity(
@WithAccountSigninMode int withAccountSigninMode,
@HistoryOptInMode int historyOptInMode) {
AccountPickerBottomSheetStrings bottomSheetStrings =
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_chrome).build();
new AccountPickerBottomSheetStrings.Builder(R.string.sign_in_to_wootzapp).build();
Intent intent =
SigninAndHistoryOptInActivity.createIntent(
ApplicationProvider.getApplicationContext(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void signOutUserWithoutShowingSignOutDialog() {
GoogleServicesSettings.PREF_ALLOW_SIGNIN);
Assert.assertTrue("Chrome Signin should be allowed", allowChromeSignin.isChecked());

onView(withText(R.string.allow_chrome_signin_title)).perform(click());
onView(withText(R.string.allow_wootzapp_signin_title)).perform(click());
TestThreadUtils.runOnUiThreadBlocking(
() ->
Assert.assertFalse(
Expand Down Expand Up @@ -158,7 +158,7 @@ public void showSignOutDialogBeforeSigningUserOut() {
GoogleServicesSettings.PREF_ALLOW_SIGNIN);
Assert.assertTrue("Chrome Signin should be allowed", allowChromeSignin.isChecked());

onView(withText(R.string.allow_chrome_signin_title)).perform(click());
onView(withText(R.string.allow_wootzapp_signin_title)).perform(click());
// Accept the sign out Dialog
onView(withText(R.string.continue_button)).inRoot(isDialog()).perform(click());
TestThreadUtils.runOnUiThreadBlocking(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public class ScreenShooter extends TestWatcher {
private static final String ORIENTATION_FILTER = "Orientation";
private static final String ANDROID_VERSION_FILTER = "Android Version";
private static final String CHROME_VERSION_FILTER = "Chrome Version";
private static final String CHROME_CHANNEL_FILTER = "Chrome Channel";
private static final String WOOTZAPP_CHANNEL_FILTER = "Chrome Channel";
private static final String LOCALE_FILTER = "Locale";
// UPLOAD_TIME_FILTER is reserved for use by the Clank UI Catalogue uploader.
private static final String UPLOAD_TIME_FILTER = "Upload Time";
Expand All @@ -136,7 +136,7 @@ public class ScreenShooter extends TestWatcher {
ORIENTATION_FILTER,
ANDROID_VERSION_FILTER,
CHROME_VERSION_FILTER,
CHROME_CHANNEL_FILTER,
WOOTZAPP_CHANNEL_FILTER,
LOCALE_FILTER,
UPLOAD_TIME_FILTER
};
Expand Down Expand Up @@ -221,7 +221,7 @@ public void shoot(String shotName, TagsEnum... tags) {
if (VersionInfo.isOfficialBuild()) {
channelName = channelName + " Official";
}
setFilterValue(filters, CHROME_CHANNEL_FILTER, channelName);
setFilterValue(filters, WOOTZAPP_CHANNEL_FILTER, channelName);
setFilterValue(filters, LOCALE_FILTER, Locale.getDefault().toString());

Map<String, String> metadata = new HashMap<>();
Expand Down
2 changes: 1 addition & 1 deletion src/chrome/app/generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -8510,7 +8510,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
You're seeing this item based on your previous activity using Google services. You can see your data, delete it, and change your settings at <ph name="BEGIN_LINK1">&lt;a href="https://myactivity.google.com/" target="_blank"&gt;</ph>myactivity.google.com<ph name="END_LINK1">&lt;/a&gt;</ph>.
<ph name="BREAK">&lt;br&gt;</ph>
<ph name="BREAK">&lt;br&gt;</ph>
Learn about the data Google collects and why at <ph name="BEGIN_LINK2">&lt;a href="https://policies.google.com/" target="_blank"&gt;</ph>policies.google.com<ph name="END_LINK2">&lt;/a&gt;</ph>.
Learn about the data Google collects and why at <ph name="BEGIN_LINK2">&lt;a href="https:///" target="_blank"&gt;</ph>policies.google.com<ph name="END_LINK2">&lt;/a&gt;</ph>.
</message>
<message name="IDS_NTP_MODULES_SHOPPING_TASKS_INFO_CLOSE" desc="Text shown on close button of a task module.">
Close
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private void makeSigninNotAllowedToast() {
if (mSetTestToast) return;
Toast.makeText(
mWindowAndroid.getActivity().get(),
R.string.sign_in_to_chrome_disabled_by_user_summary,
R.string.sign_in_to_wootzapp_disabled_by_user_summary,
Toast.LENGTH_SHORT)
.show();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public void testSetSmallIcon() {
NotificationBuilderBase notificationBuilder = new StandardNotificationBuilder(context);

Bitmap bitmap =
BitmapFactory.decodeResource(context.getResources(), R.drawable.chrome_sync_logo);
BitmapFactory.decodeResource(context.getResources(), R.drawable.wootzapp_sync_logo);

notificationBuilder.setSmallIconId(R.drawable.ic_chrome);
notificationBuilder.setStatusBarIcon(bitmap);
Expand Down
Loading

0 comments on commit 104d54a

Please sign in to comment.