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

Side by Side Diff: chrome/browser/history/starred_url_database.cc

Issue 7342047: Cleanup base/stl_util (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed unneeded include + rebase Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
11 #include "base/stl_util-inl.h" 11 #include "base/stl_util.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/bookmarks/bookmark_codec.h" 15 #include "chrome/browser/bookmarks/bookmark_codec.h"
16 #include "chrome/browser/bookmarks/bookmark_model.h" 16 #include "chrome/browser/bookmarks/bookmark_model.h"
17 #include "chrome/browser/history/history.h" 17 #include "chrome/browser/history/history.h"
18 #include "sql/statement.h" 18 #include "sql/statement.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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 scoped_ptr<Value> encoded_bookmarks( 661 scoped_ptr<Value> encoded_bookmarks(
662 encoder.Encode(&bookmark_bar_node, &other_node, &synced_node)); 662 encoder.Encode(&bookmark_bar_node, &other_node, &synced_node));
663 std::string content; 663 std::string content;
664 base::JSONWriter::Write(encoded_bookmarks.get(), true, &content); 664 base::JSONWriter::Write(encoded_bookmarks.get(), true, &content);
665 665
666 return (file_util::WriteFile(path, content.c_str(), 666 return (file_util::WriteFile(path, content.c_str(),
667 static_cast<int>(content.length())) != -1); 667 static_cast<int>(content.length())) != -1);
668 } 668 }
669 669
670 } // namespace history 670 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698