OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_utils.h" | 5 #include "chrome/browser/bookmarks/bookmark_utils.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/i18n/case_conversion.h" | 11 #include "base/i18n/case_conversion.h" |
12 #include "base/i18n/string_search.h" | 12 #include "base/i18n/string_search.h" |
13 #include "base/prefs/pref_service.h" | 13 #include "base/prefs/pref_service.h" |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "chrome/browser/bookmarks/bookmark_model.h" | 17 #include "chrome/browser/bookmarks/bookmark_model.h" |
18 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 18 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
19 #include "chrome/browser/history/query_parser.h" | 19 #include "chrome/browser/history/query_parser.h" |
20 #include "chrome/browser/undo/bookmark_undo_service.h" | 20 #include "chrome/browser/undo/bookmark_undo_service.h" |
21 #include "chrome/browser/undo/bookmark_undo_service_factory.h" | 21 #include "chrome/browser/undo/bookmark_undo_service_factory.h" |
22 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| 23 #include "components/bookmarks/bookmark_pref_names.h" |
23 #include "components/user_prefs/pref_registry_syncable.h" | 24 #include "components/user_prefs/pref_registry_syncable.h" |
24 #include "content/public/browser/user_metrics.h" | 25 #include "content/public/browser/user_metrics.h" |
25 #include "net/base/net_util.h" | 26 #include "net/base/net_util.h" |
26 #include "ui/base/models/tree_node_iterator.h" | 27 #include "ui/base/models/tree_node_iterator.h" |
27 | 28 |
28 #if !defined(OS_ANDROID) | 29 #if !defined(OS_ANDROID) |
29 #include "chrome/browser/bookmarks/scoped_group_bookmark_actions.h" | 30 #include "chrome/browser/bookmarks/scoped_group_bookmark_actions.h" |
30 #endif | 31 #endif |
31 | 32 |
32 using base::Time; | 33 using base::Time; |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 // Remove all the bookmarks. | 372 // Remove all the bookmarks. |
372 for (size_t i = 0; i < bookmarks.size(); ++i) { | 373 for (size_t i = 0; i < bookmarks.size(); ++i) { |
373 const BookmarkNode* node = bookmarks[i]; | 374 const BookmarkNode* node = bookmarks[i]; |
374 int index = node->parent()->GetIndexOf(node); | 375 int index = node->parent()->GetIndexOf(node); |
375 if (index > -1) | 376 if (index > -1) |
376 model->Remove(node->parent(), index); | 377 model->Remove(node->parent(), index); |
377 } | 378 } |
378 } | 379 } |
379 | 380 |
380 } // namespace bookmark_utils | 381 } // namespace bookmark_utils |
OLD | NEW |