OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/sql/connection.h" | |
8 #include "app/sql/statement.h" | 7 #include "app/sql/statement.h" |
9 #include "base/file_util.h" | 8 #include "base/file_util.h" |
10 #include "base/logging.h" | 9 #include "base/logging.h" |
11 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
12 #include "base/scoped_vector.h" | 11 #include "base/scoped_vector.h" |
13 #include "base/stl_util-inl.h" | 12 #include "base/stl_util-inl.h" |
14 #include "base/string_util.h" | 13 #include "base/string_util.h" |
15 #include "base/values.h" | 14 #include "base/values.h" |
16 #include "chrome/browser/bookmarks/bookmark_codec.h" | 15 #include "chrome/browser/bookmarks/bookmark_codec.h" |
17 #include "chrome/browser/bookmarks/bookmark_model.h" | 16 #include "chrome/browser/bookmarks/bookmark_model.h" |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 scoped_ptr<Value> encoded_bookmarks( | 618 scoped_ptr<Value> encoded_bookmarks( |
620 encoder.Encode(&bookmark_bar_node, &other_node)); | 619 encoder.Encode(&bookmark_bar_node, &other_node)); |
621 std::string content; | 620 std::string content; |
622 base::JSONWriter::Write(encoded_bookmarks.get(), true, &content); | 621 base::JSONWriter::Write(encoded_bookmarks.get(), true, &content); |
623 | 622 |
624 return (file_util::WriteFile(path, content.c_str(), | 623 return (file_util::WriteFile(path, content.c_str(), |
625 static_cast<int>(content.length())) != -1); | 624 static_cast<int>(content.length())) != -1); |
626 } | 625 } |
627 | 626 |
628 } // namespace history | 627 } // namespace history |
OLD | NEW |