OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_H_ |
6 #define CHROME_BROWSER_HISTORY_HISTORY_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 | 522 |
523 // Designed for unit tests, this passes the given task on to the history | 523 // Designed for unit tests, this passes the given task on to the history |
524 // backend to be called once the history backend has terminated. This allows | 524 // backend to be called once the history backend has terminated. This allows |
525 // callers to know when the history thread is complete and the database files | 525 // callers to know when the history thread is complete and the database files |
526 // can be deleted and the next test run. Otherwise, the history thread may | 526 // can be deleted and the next test run. Otherwise, the history thread may |
527 // still be running, causing problems in subsequent tests. | 527 // still be running, causing problems in subsequent tests. |
528 // | 528 // |
529 // There can be only one closing task, so this will override any previously | 529 // There can be only one closing task, so this will override any previously |
530 // set task. We will take ownership of the pointer and delete it when done. | 530 // set task. We will take ownership of the pointer and delete it when done. |
531 // The task will be run on the calling thread (this function is threadsafe). | 531 // The task will be run on the calling thread (this function is threadsafe). |
532 void SetOnBackendDestroyTask(Task* task); | 532 void SetOnBackendDestroyTask(const base::Closure& task); |
533 | 533 |
534 // Used for unit testing and potentially importing to get known information | 534 // Used for unit testing and potentially importing to get known information |
535 // into the database. This assumes the URL doesn't exist in the database | 535 // into the database. This assumes the URL doesn't exist in the database |
536 // | 536 // |
537 // Calling this function many times may be slow because each call will | 537 // Calling this function many times may be slow because each call will |
538 // dispatch to the history thread and will be a separate database | 538 // dispatch to the history thread and will be a separate database |
539 // transaction. If this functionality is needed for importing many URLs, | 539 // transaction. If this functionality is needed for importing many URLs, |
540 // callers should use AddPagesWithDetails() instead. | 540 // callers should use AddPagesWithDetails() instead. |
541 // | 541 // |
542 // Note that this routine (and AddPageWithDetails()) always adds a single | 542 // Note that this routine (and AddPageWithDetails()) always adds a single |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 BookmarkService* bookmark_service_; | 859 BookmarkService* bookmark_service_; |
860 bool no_db_; | 860 bool no_db_; |
861 | 861 |
862 // True if needs top site migration. | 862 // True if needs top site migration. |
863 bool needs_top_sites_migration_; | 863 bool needs_top_sites_migration_; |
864 | 864 |
865 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 865 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
866 }; | 866 }; |
867 | 867 |
868 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ | 868 #endif // CHROME_BROWSER_HISTORY_HISTORY_H_ |
OLD | NEW |