| 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/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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 return; | 133 return; |
| 134 } | 134 } |
| 135 modified_tabs.push_back(tab); | 135 modified_tabs.push_back(tab); |
| 136 DVLOG(1) << "Received LOAD_COMPLETED_MAIN_FRAME for profile " << profile_; | 136 DVLOG(1) << "Received LOAD_COMPLETED_MAIN_FRAME for profile " << profile_; |
| 137 break; | 137 break; |
| 138 } | 138 } |
| 139 | 139 |
| 140 case chrome::NOTIFICATION_TAB_CONTENTS_DESTROYED: { | 140 case chrome::NOTIFICATION_TAB_CONTENTS_DESTROYED: { |
| 141 TabContents* tab_contents = content::Source<TabContents>(source).ptr(); | 141 TabContents* tab_contents = content::Source<TabContents>(source).ptr(); |
| 142 SyncedTabDelegate* tab = tab_contents->synced_tab_delegate(); | 142 SyncedTabDelegate* tab = tab_contents->synced_tab_delegate(); |
| 143 if (!tab || tab->profile() != profile_) { | 143 if (!tab || tab->profile() != profile_) |
| 144 return; | 144 return; |
| 145 } | |
| 146 modified_tabs.push_back(tab); | 145 modified_tabs.push_back(tab); |
| 147 DVLOG(1) << "Received NOTIFICATION_TAB_CONTENTS_DESTROYED for profile " | 146 DVLOG(1) << "Received NOTIFICATION_TAB_CONTENTS_DESTROYED for profile " |
| 148 << profile_; | 147 << profile_; |
| 149 break; | 148 break; |
| 150 } | 149 } |
| 151 | 150 |
| 152 case content::NOTIFICATION_NAV_LIST_PRUNED: { | 151 case content::NOTIFICATION_NAV_LIST_PRUNED: { |
| 153 SyncedTabDelegate* tab = ExtractSyncedTabDelegate(source); | 152 SyncedTabDelegate* tab = ExtractSyncedTabDelegate(source); |
| 154 if (!tab || tab->profile() != profile_) { | 153 if (!tab || tab->profile() != profile_) { |
| 155 return; | 154 return; |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 notification_registrar_.Add(this, chrome::NOTIFICATION_FAVICON_CHANGED, | 365 notification_registrar_.Add(this, chrome::NOTIFICATION_FAVICON_CHANGED, |
| 367 content::Source<Profile>(profile_)); | 366 content::Source<Profile>(profile_)); |
| 368 } | 367 } |
| 369 | 368 |
| 370 void SessionChangeProcessor::StopObserving() { | 369 void SessionChangeProcessor::StopObserving() { |
| 371 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 370 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 372 notification_registrar_.RemoveAll(); | 371 notification_registrar_.RemoveAll(); |
| 373 } | 372 } |
| 374 | 373 |
| 375 } // namespace browser_sync | 374 } // namespace browser_sync |
| OLD | NEW |