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

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

Issue 126184: Move TableModel out of views/ and into app/.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: addressed comments, build fixes Created 11 years, 6 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_table_model.h" 5 #include "chrome/browser/bookmarks/bookmark_table_model.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
11 #include "app/table_model_observer.h"
11 #include "base/string_util.h" 12 #include "base/string_util.h"
12 #include "base/time_format.h" 13 #include "base/time_format.h"
13 #include "chrome/browser/bookmarks/bookmark_utils.h" 14 #include "chrome/browser/bookmarks/bookmark_utils.h"
14 #include "chrome/browser/profile.h" 15 #include "chrome/browser/profile.h"
15 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
16 #include "chrome/common/pref_service.h" 17 #include "chrome/common/pref_service.h"
17 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
18 #include "grit/app_resources.h" 19 #include "grit/app_resources.h"
19 #include "grit/generated_resources.h" 20 #include "grit/generated_resources.h"
20 #include "grit/theme_resources.h" 21 #include "grit/theme_resources.h"
21 #include "net/base/escape.h" 22 #include "net/base/escape.h"
22 #include "net/base/net_util.h" 23 #include "net/base/net_util.h"
23 24
24 #if defined(TOOLKIT_VIEWS)
25 #include "views/controls/table/table_model_observer.h"
26 #endif
27
28 namespace { 25 namespace {
29 26
30 // Number of bookmarks shown in recently bookmarked. 27 // Number of bookmarks shown in recently bookmarked.
31 const int kRecentlyBookmarkedCount = 50; 28 const int kRecentlyBookmarkedCount = 50;
32 29
33 // VectorBackedBookmarkTableModel ---------------------------------------------- 30 // VectorBackedBookmarkTableModel ----------------------------------------------
34 31
35 class VectorBackedBookmarkTableModel : public BookmarkTableModel { 32 class VectorBackedBookmarkTableModel : public BookmarkTableModel {
36 public: 33 public:
37 explicit VectorBackedBookmarkTableModel(BookmarkModel* model) 34 explicit VectorBackedBookmarkTableModel(BookmarkModel* model)
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 return; 401 return;
405 } 402 }
406 if (node == model()->other_node()) { 403 if (node == model()->other_node()) {
407 *path = l10n_util::GetString(IDS_BOOKMARK_TABLE_OTHER_BOOKMARKS_PATH); 404 *path = l10n_util::GetString(IDS_BOOKMARK_TABLE_OTHER_BOOKMARKS_PATH);
408 return; 405 return;
409 } 406 }
410 BuildPath(node->GetParent(), path); 407 BuildPath(node->GetParent(), path);
411 path->append(l10n_util::GetString(IDS_BOOKMARK_TABLE_PATH_SEPARATOR)); 408 path->append(l10n_util::GetString(IDS_BOOKMARK_TABLE_PATH_SEPARATOR));
412 path->append(node->GetTitle()); 409 path->append(node->GetTitle());
413 } 410 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_table_model.h ('k') | chrome/browser/bookmarks/bookmark_table_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698