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

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

Issue 2888273003: [Offline Pages] Add an observer for requests in the CCT namespace. (Closed)
Patch Set: comments. Created 3 years, 7 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.offlinepages;
6
7 import org.chromium.base.annotations.CalledByNative;
8
9 /**
10 * Class used to propagate the final status of CCT offline pages requests.
11 */
12 public class CCTRequestStatus {
13 private CCTRequestStatus(int savePageResult, String savedPageId) {
14 mSavePageResult = savePageResult;
15 mSavedPageId = savedPageId;
16 }
17
18 private int mSavePageResult;
19 private String mSavedPageId;
20
21 /**
22 * @return An org.chromium.components.offlinepages.BackgroundSavePageResult for this request.
23 */
24 public int getSavePageResult() {
25 return mSavePageResult;
26 }
27
28 /**
29 * @return The ID string extracted from the ClientId of the page.
30 */
31 public String getSavedPageId() {
32 return mSavedPageId;
33 }
34
35 /**
36 * Creates a request status object.
37 * @param result an offlinepages.BackgroundSavePageResult
38 * @param savedPageId the ID of the page that was completed.
39 */
40 @CalledByNative
41 public static CCTRequestStatus create(int result, String savedPageId) {
42 return new CCTRequestStatus(result, savedPageId);
43 }
44 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java ('k') | chrome/android/java_sources.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698