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

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

Issue 284893003: Move bookmarks/core/... to bookmarks/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing errors reported by presubmit Created 6 years, 7 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/core/browser/bookmark_expanded_state_tracker.h" 5 #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "components/bookmarks/core/browser/bookmark_model.h" 10 #include "components/bookmarks/browser/bookmark_model.h"
11 #include "components/bookmarks/core/browser/bookmark_utils.h" 11 #include "components/bookmarks/browser/bookmark_utils.h"
12 #include "components/bookmarks/core/common/bookmark_pref_names.h" 12 #include "components/bookmarks/common/bookmark_pref_names.h"
13 13
14 BookmarkExpandedStateTracker::BookmarkExpandedStateTracker( 14 BookmarkExpandedStateTracker::BookmarkExpandedStateTracker(
15 BookmarkModel* bookmark_model, 15 BookmarkModel* bookmark_model,
16 PrefService* pref_service) 16 PrefService* pref_service)
17 : bookmark_model_(bookmark_model), 17 : bookmark_model_(bookmark_model),
18 pref_service_(pref_service) { 18 pref_service_(pref_service) {
19 bookmark_model->AddObserver(this); 19 bookmark_model->AddObserver(this);
20 } 20 }
21 21
22 BookmarkExpandedStateTracker::~BookmarkExpandedStateTracker() { 22 BookmarkExpandedStateTracker::~BookmarkExpandedStateTracker() {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return; 101 return;
102 102
103 base::ListValue values; 103 base::ListValue values;
104 for (Nodes::const_iterator i = nodes.begin(); i != nodes.end(); ++i) { 104 for (Nodes::const_iterator i = nodes.begin(); i != nodes.end(); ++i) {
105 values.Set(values.GetSize(), 105 values.Set(values.GetSize(),
106 new base::StringValue(base::Int64ToString((*i)->id()))); 106 new base::StringValue(base::Int64ToString((*i)->id())));
107 } 107 }
108 108
109 pref_service_->Set(prefs::kBookmarkEditorExpandedNodes, values); 109 pref_service_->Set(prefs::kBookmarkEditorExpandedNodes, values);
110 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698