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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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_BACKEND_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 // state into the HistoryBackend databases. Close all of the databases managed 467 // state into the HistoryBackend databases. Close all of the databases managed
468 // HistoryBackend as there are no provisions for accessing the other databases 468 // HistoryBackend as there are no provisions for accessing the other databases
469 // managed by HistoryBackend when the history database cannot be accessed. 469 // managed by HistoryBackend when the history database cannot be accessed.
470 void KillHistoryDatabase(); 470 void KillHistoryDatabase();
471 471
472 // Testing ------------------------------------------------------------------- 472 // Testing -------------------------------------------------------------------
473 473
474 // Sets the task to run and the message loop to run it on when this object 474 // Sets the task to run and the message loop to run it on when this object
475 // is destroyed. See HistoryService::SetOnBackendDestroyTask for a more 475 // is destroyed. See HistoryService::SetOnBackendDestroyTask for a more
476 // complete description. 476 // complete description.
477 void SetOnBackendDestroyTask(MessageLoop* message_loop, 477 void SetOnBackendDestroyTask(base::MessageLoop* message_loop,
478 const base::Closure& task); 478 const base::Closure& task);
479 479
480 // Adds the given rows to the database if it doesn't exist. A visit will be 480 // Adds the given rows to the database if it doesn't exist. A visit will be
481 // added for each given URL at the last visit time in the URLRow if the 481 // added for each given URL at the last visit time in the URLRow if the
482 // passed visit type != SOURCE_SYNCED (the sync code manages visits itself). 482 // passed visit type != SOURCE_SYNCED (the sync code manages visits itself).
483 // Each visit will have the visit_source type set. 483 // Each visit will have the visit_source type set.
484 void AddPagesWithDetails(const URLRows& info, VisitSource visit_source); 484 void AddPagesWithDetails(const URLRows& info, VisitSource visit_source);
485 485
486 #if defined(UNIT_TEST) 486 #if defined(UNIT_TEST)
487 HistoryDatabase* db() const { return db_.get(); } 487 HistoryDatabase* db() const { return db_.get(); }
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 // 859 //
860 // As with AddPage, the last item in the redirect chain will be the 860 // As with AddPage, the last item in the redirect chain will be the
861 // destination of the redirect (i.e., the key into recent_redirects_); 861 // destination of the redirect (i.e., the key into recent_redirects_);
862 typedef base::MRUCache<GURL, history::RedirectList> RedirectCache; 862 typedef base::MRUCache<GURL, history::RedirectList> RedirectCache;
863 RedirectCache recent_redirects_; 863 RedirectCache recent_redirects_;
864 864
865 // Timestamp of the first entry in our database. 865 // Timestamp of the first entry in our database.
866 base::Time first_recorded_time_; 866 base::Time first_recorded_time_;
867 867
868 // When set, this is the task that should be invoked on destruction. 868 // When set, this is the task that should be invoked on destruction.
869 MessageLoop* backend_destroy_message_loop_; 869 base::MessageLoop* backend_destroy_message_loop_;
870 base::Closure backend_destroy_task_; 870 base::Closure backend_destroy_task_;
871 871
872 // Tracks page transition types. 872 // Tracks page transition types.
873 VisitTracker tracker_; 873 VisitTracker tracker_;
874 874
875 // A boolean variable to track whether we have already purged obsolete segment 875 // A boolean variable to track whether we have already purged obsolete segment
876 // data. 876 // data.
877 bool segment_queried_; 877 bool segment_queried_;
878 878
879 // HistoryDBTasks to run. Be sure to AddRef when adding, and Release when 879 // HistoryDBTasks to run. Be sure to AddRef when adding, and Release when
(...skipping 15 matching lines...) Expand all
895 // Used to provide the Android ContentProvider APIs. 895 // Used to provide the Android ContentProvider APIs.
896 scoped_ptr<AndroidProviderBackend> android_provider_backend_; 896 scoped_ptr<AndroidProviderBackend> android_provider_backend_;
897 #endif 897 #endif
898 898
899 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); 899 DISALLOW_COPY_AND_ASSIGN(HistoryBackend);
900 }; 900 };
901 901
902 } // namespace history 902 } // namespace history
903 903
904 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ 904 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698