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

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

Issue 1662523004: Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/bookmarks/browser/bookmark_expanded_state_tracker.h" 5 #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
11 #include "base/values.h" 10 #include "base/values.h"
12 #include "components/bookmarks/browser/bookmark_model.h" 11 #include "components/bookmarks/browser/bookmark_model.h"
13 #include "components/bookmarks/browser/bookmark_utils.h" 12 #include "components/bookmarks/browser/bookmark_utils.h"
14 #include "components/bookmarks/common/bookmark_pref_names.h" 13 #include "components/bookmarks/common/bookmark_pref_names.h"
14 #include "components/prefs/pref_service.h"
15 15
16 namespace bookmarks { 16 namespace bookmarks {
17 17
18 BookmarkExpandedStateTracker::BookmarkExpandedStateTracker( 18 BookmarkExpandedStateTracker::BookmarkExpandedStateTracker(
19 BookmarkModel* bookmark_model, 19 BookmarkModel* bookmark_model,
20 PrefService* pref_service) 20 PrefService* pref_service)
21 : bookmark_model_(bookmark_model), 21 : bookmark_model_(bookmark_model),
22 pref_service_(pref_service) { 22 pref_service_(pref_service) {
23 bookmark_model->AddObserver(this); 23 bookmark_model->AddObserver(this);
24 } 24 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 base::ListValue values; 107 base::ListValue values;
108 for (Nodes::const_iterator i = nodes.begin(); i != nodes.end(); ++i) { 108 for (Nodes::const_iterator i = nodes.begin(); i != nodes.end(); ++i) {
109 values.Set(values.GetSize(), 109 values.Set(values.GetSize(),
110 new base::StringValue(base::Int64ToString((*i)->id()))); 110 new base::StringValue(base::Int64ToString((*i)->id())));
111 } 111 }
112 112
113 pref_service_->Set(prefs::kBookmarkEditorExpandedNodes, values); 113 pref_service_->Set(prefs::kBookmarkEditorExpandedNodes, values);
114 } 114 }
115 115
116 } // namespace bookmarks 116 } // namespace bookmarks
OLDNEW
« no previous file with comments | « components/bookmarks/DEPS ('k') | components/bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698