| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/bookmarks/bookmark_tab_helper.h" | 5 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 9 #include "chrome/browser/defaults.h" | 9 #include "chrome/browser/defaults.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/search/search.h" | 11 #include "chrome/browser/search/search.h" |
| 12 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" | 12 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" |
| 13 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" | 13 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" |
| 14 #include "chrome/browser/ui/sad_tab.h" | 14 #include "chrome/browser/ui/sad_tab.h" |
| 15 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 15 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 16 #include "components/bookmarks/browser/bookmark_model.h" | 16 #include "components/bookmarks/browser/bookmark_model.h" |
| 17 #include "components/bookmarks/common/bookmark_pref_names.h" | 17 #include "components/bookmarks/common/bookmark_pref_names.h" |
| 18 #include "components/syncable_prefs/pref_service_syncable.h" | 18 #include "components/sync_preferences/pref_service_syncable.h" |
| 19 #include "content/public/browser/navigation_entry.h" | 19 #include "content/public/browser/navigation_entry.h" |
| 20 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
| 21 | 21 |
| 22 using bookmarks::BookmarkModel; | 22 using bookmarks::BookmarkModel; |
| 23 using bookmarks::BookmarkNode; | 23 using bookmarks::BookmarkNode; |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 bool IsNTP(content::WebContents* web_contents) { | 27 bool IsNTP(content::WebContents* web_contents) { |
| 28 // Use the committed entry so the bookmarks bar disappears at the same time | 28 // Use the committed entry so the bookmarks bar disappears at the same time |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 void BookmarkTabHelper::DidAttachInterstitialPage() { | 140 void BookmarkTabHelper::DidAttachInterstitialPage() { |
| 141 // Interstitials are not necessarily starred just because the page that | 141 // Interstitials are not necessarily starred just because the page that |
| 142 // created them is, so star state has to track interstitial attach/detach if | 142 // created them is, so star state has to track interstitial attach/detach if |
| 143 // necessary. | 143 // necessary. |
| 144 UpdateStarredStateForCurrentURL(); | 144 UpdateStarredStateForCurrentURL(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 void BookmarkTabHelper::DidDetachInterstitialPage() { | 147 void BookmarkTabHelper::DidDetachInterstitialPage() { |
| 148 UpdateStarredStateForCurrentURL(); | 148 UpdateStarredStateForCurrentURL(); |
| 149 } | 149 } |
| OLD | NEW |