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

Side by Side Diff: chrome/browser/history/history_service.h

Issue 930363002: Remove adapter method on HistoryBackend delegating to AndroidProviderBackend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 // Observers ----------------------------------------------------------------- 439 // Observers -----------------------------------------------------------------
440 440
441 // Adds/Removes an Observer. 441 // Adds/Removes an Observer.
442 void AddObserver(history::HistoryServiceObserver* observer); 442 void AddObserver(history::HistoryServiceObserver* observer);
443 void RemoveObserver(history::HistoryServiceObserver* observer); 443 void RemoveObserver(history::HistoryServiceObserver* observer);
444 444
445 // Generic Stuff ------------------------------------------------------------- 445 // Generic Stuff -------------------------------------------------------------
446 446
447 // Schedules a HistoryDBTask for running on the history backend thread. See 447 // Schedules a HistoryDBTask for running on the history backend thread. See
448 // HistoryDBTask for details on what this does. Takes ownership of |task|. 448 // HistoryDBTask for details on what this does. Takes ownership of |task|.
449 virtual void ScheduleDBTask(scoped_ptr<history::HistoryDBTask> task, 449 virtual base::CancelableTaskTracker::TaskId ScheduleDBTask(
450 base::CancelableTaskTracker* tracker); 450 scoped_ptr<history::HistoryDBTask> task,
451 base::CancelableTaskTracker* tracker);
451 452
452 // This callback is invoked when favicon change for urls. 453 // This callback is invoked when favicon change for urls.
453 typedef base::Callback<void(const std::set<GURL>&)> OnFaviconChangedCallback; 454 typedef base::Callback<void(const std::set<GURL>&)> OnFaviconChangedCallback;
454 455
455 // Add a callback to the list. The callback will remain registered until the 456 // Add a callback to the list. The callback will remain registered until the
456 // returned Subscription is destroyed. This must occurs before HistoryService 457 // returned Subscription is destroyed. This must occurs before HistoryService
457 // is destroyed. 458 // is destroyed.
458 scoped_ptr<base::CallbackList<void(const std::set<GURL>&)>::Subscription> 459 scoped_ptr<base::CallbackList<void(const std::set<GURL>&)>::Subscription>
459 AddFaviconChangedCallback(const OnFaviconChangedCallback& callback) 460 AddFaviconChangedCallback(const OnFaviconChangedCallback& callback)
460 WARN_UNUSED_RESULT; 461 WARN_UNUSED_RESULT;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 // These are not currently used, hopefully we can do something in the future 521 // These are not currently used, hopefully we can do something in the future
521 // to ensure that the most important things happen first. 522 // to ensure that the most important things happen first.
522 enum SchedulePriority { 523 enum SchedulePriority {
523 PRIORITY_UI, // The highest priority (must respond to UI events). 524 PRIORITY_UI, // The highest priority (must respond to UI events).
524 PRIORITY_NORMAL, // Normal stuff like adding a page. 525 PRIORITY_NORMAL, // Normal stuff like adding a page.
525 PRIORITY_LOW, // Low priority things like indexing or expiration. 526 PRIORITY_LOW, // Low priority things like indexing or expiration.
526 }; 527 };
527 528
528 private: 529 private:
529 class BackendDelegate; 530 class BackendDelegate;
530 #if defined(OS_ANDROID)
531 friend class AndroidHistoryProviderService;
532 #endif
533 friend class base::RefCountedThreadSafe<HistoryService>; 531 friend class base::RefCountedThreadSafe<HistoryService>;
534 friend class BackendDelegate; 532 friend class BackendDelegate;
535 friend class FaviconService; 533 friend class FaviconService;
536 friend class history::HistoryBackend; 534 friend class history::HistoryBackend;
537 friend class history::HistoryQueryTest; 535 friend class history::HistoryQueryTest;
538 friend class HistoryOperation; 536 friend class HistoryOperation;
539 friend class HistoryQuickProviderTest; 537 friend class HistoryQuickProviderTest;
540 friend class history::HistoryTest; 538 friend class history::HistoryTest;
541 friend class HistoryURLProvider; 539 friend class HistoryURLProvider;
542 friend class HistoryURLProviderTest; 540 friend class HistoryURLProviderTest;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 837
840 history::DeleteDirectiveHandler delete_directive_handler_; 838 history::DeleteDirectiveHandler delete_directive_handler_;
841 839
842 // All vended weak pointers are invalidated in Cleanup(). 840 // All vended weak pointers are invalidated in Cleanup().
843 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; 841 base::WeakPtrFactory<HistoryService> weak_ptr_factory_;
844 842
845 DISALLOW_COPY_AND_ASSIGN(HistoryService); 843 DISALLOW_COPY_AND_ASSIGN(HistoryService);
846 }; 844 };
847 845
848 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 846 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698