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

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

Issue 845543005: Rename SyncStatusHelper to AndroidSyncSettings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gsm
Patch Set: Created 5 years, 11 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.app.SearchManager; 8 import android.app.SearchManager;
9 import android.content.ContentProvider; 9 import android.content.ContentProvider;
10 import android.content.ContentUris; 10 import android.content.ContentUris;
(...skipping 16 matching lines...) Expand all
27 import android.provider.Browser.BookmarkColumns; 27 import android.provider.Browser.BookmarkColumns;
28 import android.provider.Browser.SearchColumns; 28 import android.provider.Browser.SearchColumns;
29 import android.text.TextUtils; 29 import android.text.TextUtils;
30 import android.util.Log; 30 import android.util.Log;
31 31
32 import org.chromium.base.CalledByNative; 32 import org.chromium.base.CalledByNative;
33 import org.chromium.base.CalledByNativeUnchecked; 33 import org.chromium.base.CalledByNativeUnchecked;
34 import org.chromium.base.ThreadUtils; 34 import org.chromium.base.ThreadUtils;
35 import org.chromium.base.VisibleForTesting; 35 import org.chromium.base.VisibleForTesting;
36 import org.chromium.chrome.browser.database.SQLiteCursor; 36 import org.chromium.chrome.browser.database.SQLiteCursor;
37 import org.chromium.sync.notifier.SyncStatusHelper; 37 import org.chromium.sync.AndroidSyncSettings;
38 38
39 import java.util.ArrayList; 39 import java.util.ArrayList;
40 import java.util.Arrays; 40 import java.util.Arrays;
41 import java.util.HashMap; 41 import java.util.HashMap;
42 import java.util.List; 42 import java.util.List;
43 import java.util.Vector; 43 import java.util.Vector;
44 import java.util.concurrent.atomic.AtomicBoolean; 44 import java.util.concurrent.atomic.AtomicBoolean;
45 45
46 /** 46 /**
47 * This class provides access to user data stored in Chrome, such as bookmarks, most visited pages, 47 * This class provides access to user data stored in Chrome, such as bookmarks, most visited pages,
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 621
622 private BookmarkNode getEditableBookmarkFolderHierarchy() { 622 private BookmarkNode getEditableBookmarkFolderHierarchy() {
623 return nativeGetEditableBookmarkFolders(mNativeChromeBrowserProvider); 623 return nativeGetEditableBookmarkFolders(mNativeChromeBrowserProvider);
624 } 624 }
625 625
626 protected BookmarkNode getBookmarkNode(long nodeId, boolean getParent, boole an getChildren, 626 protected BookmarkNode getBookmarkNode(long nodeId, boolean getParent, boole an getChildren,
627 boolean getFavicons, boolean getThumbnails) { 627 boolean getFavicons, boolean getThumbnails) {
628 // Don't allow going up the hierarchy if sync is disabled and the reques ted node 628 // Don't allow going up the hierarchy if sync is disabled and the reques ted node
629 // is the Mobile Bookmarks folder. 629 // is the Mobile Bookmarks folder.
630 if (getParent && nodeId == getMobileBookmarksFolderId() 630 if (getParent && nodeId == getMobileBookmarksFolderId()
631 && !SyncStatusHelper.get(getContext()).isSyncEnabled()) { 631 && !AndroidSyncSettings.get(getContext()).isSyncEnabled()) {
632 getParent = false; 632 getParent = false;
633 } 633 }
634 634
635 BookmarkNode node = nativeGetBookmarkNode(mNativeChromeBrowserProvider, nodeId, getParent, 635 BookmarkNode node = nativeGetBookmarkNode(mNativeChromeBrowserProvider, nodeId, getParent,
636 getChildren); 636 getChildren);
637 if (!getFavicons && !getThumbnails) return node; 637 if (!getFavicons && !getThumbnails) return node;
638 638
639 // Favicons and thumbnails need to be populated separately as they are p rovided 639 // Favicons and thumbnails need to be populated separately as they are p rovided
640 // asynchronously by Chromium services other than the bookmark model. 640 // asynchronously by Chromium services other than the bookmark model.
641 if (node.parent() != null) populateNodeImages(node.parent(), getFavicons , getThumbnails); 641 if (node.parent() != null) populateNodeImages(node.parent(), getFavicons , getThumbnails);
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 1380
1381 private native BookmarkNode nativeGetMobileBookmarksFolder(long nativeChrome BrowserProvider); 1381 private native BookmarkNode nativeGetMobileBookmarksFolder(long nativeChrome BrowserProvider);
1382 1382
1383 private native boolean nativeIsBookmarkInMobileBookmarksBranch(long nativeCh romeBrowserProvider, 1383 private native boolean nativeIsBookmarkInMobileBookmarksBranch(long nativeCh romeBrowserProvider,
1384 long id); 1384 long id);
1385 1385
1386 private native byte[] nativeGetFaviconOrTouchIcon(long nativeChromeBrowserPr ovider, String url); 1386 private native byte[] nativeGetFaviconOrTouchIcon(long nativeChromeBrowserPr ovider, String url);
1387 1387
1388 private native byte[] nativeGetThumbnail(long nativeChromeBrowserProvider, S tring url); 1388 private native byte[] nativeGetThumbnail(long nativeChromeBrowserProvider, S tring url);
1389 } 1389 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698