| OLD | NEW |
| 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/bookmarks/bookmark_expanded_state_tracker.h" | 5 #include "chrome/browser/bookmarks/bookmark_expanded_state_tracker.h" |
| 6 | 6 |
| 7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 GetExpandedNodes(); | 85 GetExpandedNodes(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void BookmarkExpandedStateTracker::UpdatePrefs(const Nodes& nodes) { | 88 void BookmarkExpandedStateTracker::UpdatePrefs(const Nodes& nodes) { |
| 89 if (!profile_->GetPrefs()) | 89 if (!profile_->GetPrefs()) |
| 90 return; | 90 return; |
| 91 | 91 |
| 92 ListValue values; | 92 ListValue values; |
| 93 for (Nodes::const_iterator i = nodes.begin(); i != nodes.end(); ++i) { | 93 for (Nodes::const_iterator i = nodes.begin(); i != nodes.end(); ++i) { |
| 94 values.Set(values.GetSize(), | 94 values.Set(values.GetSize(), |
| 95 new StringValue(base::Int64ToString((*i)->id()))); | 95 base::StringValue::New(base::Int64ToString((*i)->id()))); |
| 96 } | 96 } |
| 97 profile_->GetPrefs()->Set(pref_path_, values); | 97 profile_->GetPrefs()->Set(pref_path_, values); |
| 98 } | 98 } |
| OLD | NEW |