Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java

Issue 2284933002: Remove OfflineURL from offline page (Closed)
Patch Set: Fix trybot Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.Activity; 9 import android.app.Activity;
10 import android.app.SearchManager; 10 import android.app.SearchManager;
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 1018
1019 triggerShare(currentTab, shareDirectly, isIncognito); 1019 triggerShare(currentTab, shareDirectly, isIncognito);
1020 } 1020 }
1021 1021
1022 private void triggerShare( 1022 private void triggerShare(
1023 final Tab currentTab, final boolean shareDirectly, boolean isIncogni to) { 1023 final Tab currentTab, final boolean shareDirectly, boolean isIncogni to) {
1024 final Activity mainActivity = this; 1024 final Activity mainActivity = this;
1025 ContentBitmapCallback callback = new ContentBitmapCallback() { 1025 ContentBitmapCallback callback = new ContentBitmapCallback() {
1026 @Override 1026 @Override
1027 public void onFinishGetBitmap(Bitmap bitmap, int response) { 1027 public void onFinishGetBitmap(Bitmap bitmap, int response) {
1028 boolean isOfflinePage = currentTab.isOfflinePage();
1029 RecordHistogram.recordBooleanHistogram( 1028 RecordHistogram.recordBooleanHistogram(
1030 "OfflinePages.SharedPageWasOffline", isOfflinePage); 1029 "OfflinePages.SharedPageWasOffline", currentTab.isOfflin ePage());
1031 boolean canShareOfflinePage = OfflinePageBridge.isPageSharingEna bled(); 1030 boolean canShareOfflinePage = OfflinePageBridge.isPageSharingEna bled();
1032 1031
1033 if (canShareOfflinePage) { 1032 if (canShareOfflinePage) {
1034 // Share the offline page instead of the URL. 1033 // Share the offline page instead of the URL.
1035 OfflinePageUtils.shareOfflinePage(shareDirectly, true, mainA ctivity, null, 1034 OfflinePageUtils.shareOfflinePage(shareDirectly, true, mainA ctivity, null,
1036 currentTab.getUrl(), bitmap, null, currentTab, isOff linePage); 1035 currentTab.getUrl(), bitmap, null, currentTab);
1037 } else { 1036 } else {
1038 ShareHelper.share(shareDirectly, true, mainActivity, current Tab.getTitle(), 1037 ShareHelper.share(shareDirectly, true, mainActivity, current Tab.getTitle(),
1039 null, currentTab.getUrl(), null, bitmap, null); 1038 null, currentTab.getUrl(), null, bitmap, null);
1040 if (shareDirectly) { 1039 if (shareDirectly) {
1041 RecordUserAction.record("MobileMenuDirectShare"); 1040 RecordUserAction.record("MobileMenuDirectShare");
1042 } else { 1041 } else {
1043 RecordUserAction.record("MobileMenuShare"); 1042 RecordUserAction.record("MobileMenuShare");
1044 } 1043 }
1045 } 1044 }
1046 } 1045 }
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 "Android.MultiWindowMode.IsTabletScreenWidthBelow600", 1817 "Android.MultiWindowMode.IsTabletScreenWidthBelow600",
1819 mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP); 1818 mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP);
1820 1819
1821 if (mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP) { 1820 if (mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP) {
1822 RecordHistogram.recordLinearCountHistogram( 1821 RecordHistogram.recordLinearCountHistogram(
1823 "Android.MultiWindowMode.TabletScreenWidth", mScreenWidthDp, 1, 1822 "Android.MultiWindowMode.TabletScreenWidth", mScreenWidthDp, 1,
1824 DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP, 50); 1823 DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP, 50);
1825 } 1824 }
1826 } 1825 }
1827 } 1826 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698