Commit 00a707ee authored by Pete Williamson's avatar Pete Williamson Committed by Commit Bot

Decouple publishing from sharing in PublishPageCallback.

Bug: 758690
Change-Id: I829790f7f53d97b4717b653b3eeae9065387e7ad
Reviewed-on: https://chromium-review.googlesource.com/994336Reviewed-by: default avatarJian Li <jianli@chromium.org>
Commit-Queue: Peter Williamson <petewil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547906}
parent ccfb59af
...@@ -458,8 +458,15 @@ public class OfflinePageUtils { ...@@ -458,8 +458,15 @@ public class OfflinePageUtils {
} }
/** /**
* Callback from the native code to publish a page. This will take the page, now in * Called when publishing is done. Continues with processing to share.
* a public directory, and share it. */
public static void publishCompleted(OfflinePageItem page, final Activity activity,
final Callback<ShareParams> shareCallback) {
sharePublishedPage(page, activity, shareCallback);
}
/**
* This will take a page in a public directory, and share it.
*/ */
public static void sharePublishedPage(OfflinePageItem page, final Activity activity, public static void sharePublishedPage(OfflinePageItem page, final Activity activity,
final Callback<ShareParams> shareCallback) { final Callback<ShareParams> shareCallback) {
......
...@@ -45,6 +45,6 @@ public class PublishPageCallback implements Callback<String> { ...@@ -45,6 +45,6 @@ public class PublishPageCallback implements Callback<String> {
// TODO(petewil): Sharing seems out of place here. Move the call to sharing // TODO(petewil): Sharing seems out of place here. Move the call to sharing
// back to OfflinePageUtils. // back to OfflinePageUtils.
OfflinePageUtils.sharePublishedPage(page, mActivity, mShareCallback); OfflinePageUtils.publishCompleted(page, mActivity, mShareCallback);
} }
} }
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