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

Side by Side Diff: chrome/browser/sync/glue/session_change_processor.cc

Issue 10917026: Switch Extensions::TabHelper to use WebContents, WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 8 years, 3 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
OLDNEW
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/sync/glue/session_change_processor.h" 5 #include "chrome/browser/sync/glue/session_change_processor.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 return; 174 return;
175 } 175 }
176 modified_tabs.push_back(tab); 176 modified_tabs.push_back(tab);
177 DVLOG(1) << "Received NAV_ENTRY_COMMITTED for profile " << profile_; 177 DVLOG(1) << "Received NAV_ENTRY_COMMITTED for profile " << profile_;
178 break; 178 break;
179 } 179 }
180 180
181 case chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED: { 181 case chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED: {
182 extensions::TabHelper* extension_tab_helper = 182 extensions::TabHelper* extension_tab_helper =
183 content::Source<extensions::TabHelper>(source).ptr(); 183 content::Source<extensions::TabHelper>(source).ptr();
184 if (!extension_tab_helper || 184 if (extension_tab_helper->web_contents()->GetBrowserContext() !=
185 extension_tab_helper->web_contents()->GetBrowserContext() !=
186 profile_) { 185 profile_) {
187 return; 186 return;
188 } 187 }
189 if (extension_tab_helper->extension_app()) { 188 if (extension_tab_helper->extension_app()) {
190 modified_tabs.push_back(extension_tab_helper->tab_contents()-> 189 TabContents* tab_contents =
191 synced_tab_delegate()); 190 TabContents::FromWebContents(extension_tab_helper->web_contents());
191 modified_tabs.push_back(tab_contents->synced_tab_delegate());
192 } 192 }
193 DVLOG(1) << "Received TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED " 193 DVLOG(1) << "Received TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED "
194 << "for profile " << profile_; 194 << "for profile " << profile_;
195 break; 195 break;
196 } 196 }
197 197
198 default: 198 default:
199 LOG(ERROR) << "Received unexpected notification of type " 199 LOG(ERROR) << "Received unexpected notification of type "
200 << type; 200 << type;
201 break; 201 break;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 notification_registrar_.Add(this, chrome::NOTIFICATION_FAVICON_CHANGED, 365 notification_registrar_.Add(this, chrome::NOTIFICATION_FAVICON_CHANGED,
366 content::Source<Profile>(profile_)); 366 content::Source<Profile>(profile_));
367 } 367 }
368 368
369 void SessionChangeProcessor::StopObserving() { 369 void SessionChangeProcessor::StopObserving() {
370 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 370 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
371 notification_registrar_.RemoveAll(); 371 notification_registrar_.RemoveAll();
372 } 372 }
373 373
374 } // namespace browser_sync 374 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sessions/tab_restore_service.cc ('k') | chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698