OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 // Clears the list of notifications received. | 72 // Clears the list of notifications received. |
73 void ClearLastNotifications() { | 73 void ClearLastNotifications() { |
74 for (size_t i = 0; i < notifications_.size(); i++) | 74 for (size_t i = 0; i < notifications_.size(); i++) |
75 delete notifications_[i].second; | 75 delete notifications_[i].second; |
76 notifications_.clear(); | 76 notifications_.clear(); |
77 } | 77 } |
78 | 78 |
79 void StarURL(const GURL& url) { | 79 void StarURL(const GURL& url) { |
80 bookmark_model_.AddURL( | 80 bookmark_model_.AddURL( |
81 bookmark_model_.GetBookmarkBarNode(), 0, std::wstring(), url); | 81 bookmark_model_.GetBookmarkBarNode(), 0, string16(), url); |
82 } | 82 } |
83 | 83 |
84 static bool IsStringInFile(const FilePath& filename, const char* str); | 84 static bool IsStringInFile(const FilePath& filename, const char* str); |
85 | 85 |
86 BookmarkModel bookmark_model_; | 86 BookmarkModel bookmark_model_; |
87 | 87 |
88 MessageLoop message_loop_; | 88 MessageLoop message_loop_; |
89 | 89 |
90 ExpireHistoryBackend expirer_; | 90 ExpireHistoryBackend expirer_; |
91 | 91 |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 EXPECT_TRUE(all->Read(now, main_db_.get(), &visits, 1)); | 814 EXPECT_TRUE(all->Read(now, main_db_.get(), &visits, 1)); |
815 EXPECT_EQ(1U, visits.size()); | 815 EXPECT_EQ(1U, visits.size()); |
816 } | 816 } |
817 | 817 |
818 // TODO(brettw) add some visits with no URL to make sure everything is updated | 818 // TODO(brettw) add some visits with no URL to make sure everything is updated |
819 // properly. Have the visits also refer to nonexistant FTS rows. | 819 // properly. Have the visits also refer to nonexistant FTS rows. |
820 // | 820 // |
821 // Maybe also refer to invalid favicons. | 821 // Maybe also refer to invalid favicons. |
822 | 822 |
823 } // namespace history | 823 } // namespace history |
OLD | NEW |