| 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 #include "chrome/browser/history/starred_url_database.h" | 5 #include "chrome/browser/history/starred_url_database.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/json_writer.h" | 9 #include "base/json_writer.h" |
| 10 #include "chrome/browser/bookmark_bar_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_bar_model.h" |
| 11 #include "chrome/browser/bookmark_codec.h" | 11 #include "chrome/browser/bookmarks/bookmark_codec.h" |
| 12 #include "chrome/browser/history/history.h" | 12 #include "chrome/browser/history/history.h" |
| 13 #include "chrome/browser/history/query_parser.h" | 13 #include "chrome/browser/history/query_parser.h" |
| 14 #include "chrome/browser/meta_table_helper.h" | 14 #include "chrome/browser/meta_table_helper.h" |
| 15 #include "chrome/common/scoped_vector.h" | 15 #include "chrome/common/scoped_vector.h" |
| 16 #include "chrome/common/sqlite_compiled_statement.h" | 16 #include "chrome/common/sqlite_compiled_statement.h" |
| 17 #include "chrome/common/sqlite_utils.h" | 17 #include "chrome/common/sqlite_utils.h" |
| 18 #include "chrome/common/stl_util-inl.h" | 18 #include "chrome/common/stl_util-inl.h" |
| 19 | 19 |
| 20 // The following table is used to store star (aka bookmark) information. This | 20 // The following table is used to store star (aka bookmark) information. This |
| 21 // class derives from URLDatabase, which has its own schema. | 21 // class derives from URLDatabase, which has its own schema. |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 encoder.Encode(&bookmark_bar_node, &other_node)); | 620 encoder.Encode(&bookmark_bar_node, &other_node)); |
| 621 std::string content; | 621 std::string content; |
| 622 JSONWriter::Write(encoded_bookmarks.get(), true, &content); | 622 JSONWriter::Write(encoded_bookmarks.get(), true, &content); |
| 623 | 623 |
| 624 return (file_util::WriteFile(path, content.c_str(), | 624 return (file_util::WriteFile(path, content.c_str(), |
| 625 static_cast<int>(content.length())) != -1); | 625 static_cast<int>(content.length())) != -1); |
| 626 } | 626 } |
| 627 | 627 |
| 628 } // namespace history | 628 } // namespace history |
| 629 | 629 |
| OLD | NEW |