OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/android/bookmarks/managed_bookmarks_shim.h" | 5 #include "chrome/browser/android/bookmarks/managed_bookmarks_shim.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/browser/bookmarks/bookmark_model.h" | 11 #include "chrome/browser/bookmarks/bookmark_model.h" |
12 #include "chrome/browser/policy/configuration_policy_handler_android.h" | 12 #include "chrome/browser/policy/managed_bookmarks_policy_handler.h" |
13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
14 #include "google_apis/gaia/gaia_auth_util.h" | 14 #include "google_apis/gaia/gaia_auth_util.h" |
15 #include "grit/component_strings.h" | 15 #include "grit/component_strings.h" |
16 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
17 | 17 |
18 using policy::ManagedBookmarksPolicyHandler; | 18 using policy::ManagedBookmarksPolicyHandler; |
19 | 19 |
20 ManagedBookmarksShim::ManagedBookmarksShim(PrefService* prefs) | 20 ManagedBookmarksShim::ManagedBookmarksShim(PrefService* prefs) |
21 : prefs_(prefs) { | 21 : prefs_(prefs) { |
22 registrar_.Init(prefs_); | 22 registrar_.Init(prefs_); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 BookmarkNode* node = new BookmarkNode(id++, GURL(url)); | 103 BookmarkNode* node = new BookmarkNode(id++, GURL(url)); |
104 node->set_type(BookmarkNode::URL); | 104 node->set_type(BookmarkNode::URL); |
105 node->SetTitle(name); | 105 node->SetTitle(name); |
106 root_->Add(node, root_->child_count()); | 106 root_->Add(node, root_->child_count()); |
107 } | 107 } |
108 } | 108 } |
109 | 109 |
110 FOR_EACH_OBSERVER(Observer, observers_, OnManagedBookmarksChanged()); | 110 FOR_EACH_OBSERVER(Observer, observers_, OnManagedBookmarksChanged()); |
111 } | 111 } |
OLD | NEW |