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

Side by Side Diff: chrome/browser/history/history_tab_helper.cc

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/history/history.cc ('k') | chrome/browser/history/top_sites.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/history/history_tab_helper.h" 5 #include "chrome/browser/history/history_tab_helper.h"
6 6
7 #include "chrome/browser/history/history.h" 7 #include "chrome/browser/history/history.h"
8 #include "chrome/browser/history/top_sites.h" 8 #include "chrome/browser/history/top_sites.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
11 #include "content/browser/tab_contents/navigation_details.h" 11 #include "content/browser/tab_contents/navigation_details.h"
12 #include "content/browser/tab_contents/navigation_entry.h" 12 #include "content/browser/tab_contents/navigation_entry.h"
13 #include "content/browser/tab_contents/tab_contents.h" 13 #include "content/browser/tab_contents/tab_contents.h"
14 #include "content/browser/tab_contents/tab_contents_delegate.h" 14 #include "content/browser/tab_contents/tab_contents_delegate.h"
15 #include "content/browser/tab_contents/title_updated_details.h" 15 #include "content/browser/tab_contents/title_updated_details.h"
16 #include "content/common/notification_service.h"
17 #include "content/common/view_messages.h" 16 #include "content/common/view_messages.h"
17 #include "content/public/browser/notification_details.h"
18 #include "content/public/browser/notification_source.h"
18 #include "content/public/browser/notification_types.h" 19 #include "content/public/browser/notification_types.h"
19 20
20 HistoryTabHelper::HistoryTabHelper(TabContents* tab_contents) 21 HistoryTabHelper::HistoryTabHelper(TabContents* tab_contents)
21 : TabContentsObserver(tab_contents), 22 : TabContentsObserver(tab_contents),
22 received_page_title_(false) { 23 received_page_title_(false) {
23 registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_TITLE_UPDATED, 24 registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_TITLE_UPDATED,
24 content::Source<TabContents>(tab_contents)); 25 content::Source<TabContents>(tab_contents));
25 } 26 }
26 27
27 HistoryTabHelper::~HistoryTabHelper() { 28 HistoryTabHelper::~HistoryTabHelper() {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 160 }
160 161
161 HistoryService* HistoryTabHelper::GetHistoryService() { 162 HistoryService* HistoryTabHelper::GetHistoryService() {
162 Profile* profile = 163 Profile* profile =
163 Profile::FromBrowserContext(tab_contents()->browser_context()); 164 Profile::FromBrowserContext(tab_contents()->browser_context());
164 if (profile->IsOffTheRecord()) 165 if (profile->IsOffTheRecord())
165 return NULL; 166 return NULL;
166 167
167 return profile->GetHistoryService(Profile::IMPLICIT_ACCESS); 168 return profile->GetHistoryService(Profile::IMPLICIT_ACCESS);
168 } 169 }
OLDNEW
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/top_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698