| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BOOKMARKS_BOOKMARK_BAR_MODEL_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_BAR_MODEL_H_ |
| 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_BAR_MODEL_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_BAR_MODEL_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include "base/lock.h" | 10 #include "base/lock.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 const std::wstring& title, | 277 const std::wstring& title, |
| 278 bool is_starred); | 278 bool is_starred); |
| 279 | 279 |
| 280 // Resets the 'date modified' time of the node to 0. This is used during | 280 // Resets the 'date modified' time of the node to 0. This is used during |
| 281 // importing to exclude the newly created groups from showing up in the | 281 // importing to exclude the newly created groups from showing up in the |
| 282 // combobox of most recently modified groups. | 282 // combobox of most recently modified groups. |
| 283 void ResetDateGroupModified(BookmarkNode* node); | 283 void ResetDateGroupModified(BookmarkNode* node); |
| 284 | 284 |
| 285 Profile* profile() const { return profile_; } | 285 Profile* profile() const { return profile_; } |
| 286 | 286 |
| 287 // Sets the store to NULL, making it so the BookmarkModel does not persist |
| 288 // any changes to disk. This is only useful during testing to speed up |
| 289 // testing. |
| 290 void ClearStore(); |
| 291 |
| 287 private: | 292 private: |
| 288 // Used to order BookmarkNodes by URL. | 293 // Used to order BookmarkNodes by URL. |
| 289 class NodeURLComparator { | 294 class NodeURLComparator { |
| 290 public: | 295 public: |
| 291 bool operator()(BookmarkNode* n1, BookmarkNode* n2) const { | 296 bool operator()(BookmarkNode* n1, BookmarkNode* n2) const { |
| 292 return n1->GetURL() < n2->GetURL(); | 297 return n1->GetURL() < n2->GetURL(); |
| 293 } | 298 } |
| 294 }; | 299 }; |
| 295 | 300 |
| 296 // Implementation of IsBookmarked. Before calling this the caller must | 301 // Implementation of IsBookmarked. Before calling this the caller must |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 // TODO(port): Implement for other platforms. | 425 // TODO(port): Implement for other platforms. |
| 421 | 426 |
| 422 // Handle to event signaled when loading is done. | 427 // Handle to event signaled when loading is done. |
| 423 ScopedHandle loaded_signal_; | 428 ScopedHandle loaded_signal_; |
| 424 #endif | 429 #endif |
| 425 | 430 |
| 426 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); | 431 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); |
| 427 }; | 432 }; |
| 428 | 433 |
| 429 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_BAR_MODEL_H_ | 434 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_BAR_MODEL_H_ |
| OLD | NEW |