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

Side by Side Diff: chrome/browser/bookmarks/bookmark_expanded_state_tracker.cc

Issue 7649006: more changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another typo Created 9 years, 4 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
« no previous file with comments | « chrome/browser/bookmarks/bookmark_codec.cc ('k') | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_codec.cc ('k') | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698