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

Side by Side Diff: chrome/browser/bookmarks/bookmark_model.cc

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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) 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 #include "chrome/browser/bookmarks/bookmark_model.h" 5 #include "chrome/browser/bookmarks/bookmark_model.h"
6 6
7 #include "base/gfx/png_decoder.h" 7 #include "base/gfx/png_decoder.h"
8 #include "chrome/browser/bookmarks/bookmark_storage.h" 8 #include "chrome/browser/bookmarks/bookmark_storage.h"
9 #include "chrome/browser/history/query_parser.h" 9 #include "chrome/browser/history/query_parser.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
11 #include "chrome/common/l10n_util.h" 11 #include "chrome/common/l10n_util.h"
12 #include "chrome/common/scoped_vector.h" 12 #include "chrome/common/scoped_vector.h"
13 13
14 #include "generated_resources.h" 14 #include "generated_resources.h"
15 15
16 using base::Time;
17
16 namespace { 18 namespace {
17 19
18 // Functions used for sorting. 20 // Functions used for sorting.
19 bool MoreRecentlyModified(BookmarkNode* n1, BookmarkNode* n2) { 21 bool MoreRecentlyModified(BookmarkNode* n1, BookmarkNode* n2) {
20 return n1->date_group_modified() > n2->date_group_modified(); 22 return n1->date_group_modified() > n2->date_group_modified();
21 } 23 }
22 24
23 bool MoreRecentlyAdded(BookmarkNode* n1, BookmarkNode* n2) { 25 bool MoreRecentlyAdded(BookmarkNode* n1, BookmarkNode* n2) {
24 return n1->date_added() > n2->date_added(); 26 return n1->date_added() > n2->date_added();
25 } 27 }
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 } 771 }
770 772
771 void BookmarkModel::PopulateNodesByURL(BookmarkNode* node) { 773 void BookmarkModel::PopulateNodesByURL(BookmarkNode* node) {
772 // NOTE: this is called with url_lock_ already held. As such, this doesn't 774 // NOTE: this is called with url_lock_ already held. As such, this doesn't
773 // explicitly grab the lock. 775 // explicitly grab the lock.
774 if (node->is_url()) 776 if (node->is_url())
775 nodes_ordered_by_url_set_.insert(node); 777 nodes_ordered_by_url_set_.insert(node);
776 for (int i = 0; i < node->GetChildCount(); ++i) 778 for (int i = 0; i < node->GetChildCount(); ++i)
777 PopulateNodesByURL(node->GetChild(i)); 779 PopulateNodesByURL(node->GetChild(i));
778 } 780 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698