Chromium Code Reviews| Index: chrome/browser/sync/glue/typed_url_change_processor.cc |
| =================================================================== |
| --- chrome/browser/sync/glue/typed_url_change_processor.cc (revision 131423) |
| +++ chrome/browser/sync/glue/typed_url_change_processor.cc (working copy) |
| @@ -68,10 +68,10 @@ |
| DVLOG(1) << "Observed typed_url change."; |
| DCHECK(running()); |
| - DCHECK(chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED == type || |
| + DCHECK(chrome::NOTIFICATION_HISTORY_URLS_MODIFIED == type || |
|
Peter Kasting
2012/04/10 02:18:57
Nit: Slightly simpler: Remove this DCHECK, change
mrossetti
2012/04/11 19:38:55
Done.
|
| chrome::NOTIFICATION_HISTORY_URLS_DELETED == type || |
| chrome::NOTIFICATION_HISTORY_URL_VISITED == type); |
| - if (type == chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED) { |
| + if (type == chrome::NOTIFICATION_HISTORY_URLS_MODIFIED) { |
| HandleURLsModified( |
| content::Details<history::URLsModifiedDetails>(details).ptr()); |
| } else if (type == chrome::NOTIFICATION_HISTORY_URLS_DELETED) { |
| @@ -89,9 +89,12 @@ |
| sync_api::WriteTransaction trans(FROM_HERE, share_handle()); |
| for (history::URLRows::iterator url = details->changed_urls.begin(); |
| url != details->changed_urls.end(); ++url) { |
| - // Exit if we were unable to update the sync node. |
| - if (!CreateOrUpdateSyncNode(*url, &trans)) |
| - return; |
| + // Only consider typed URLs. |
|
Peter Kasting
2012/04/10 02:18:57
Nit: This comment doesn't really add anything
mrossetti
2012/04/11 19:38:55
Done.
|
| + if (url->typed_count() > 0) { |
| + // Exit if we were unable to update the sync node. |
| + if (!CreateOrUpdateSyncNode(*url, &trans)) |
| + return; |
| + } |
| } |
| } |
| @@ -296,7 +299,7 @@ |
| DCHECK(expected_loop_ == MessageLoop::current()); |
| DCHECK(profile_); |
| notification_registrar_.Add( |
| - this, chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED, |
| + this, chrome::NOTIFICATION_HISTORY_URLS_MODIFIED, |
| content::Source<Profile>(profile_)); |
| notification_registrar_.Add( |
| this, chrome::NOTIFICATION_HISTORY_URLS_DELETED, |
| @@ -310,7 +313,7 @@ |
| DCHECK(expected_loop_ == MessageLoop::current()); |
| DCHECK(profile_); |
| notification_registrar_.Remove( |
| - this, chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED, |
| + this, chrome::NOTIFICATION_HISTORY_URLS_MODIFIED, |
| content::Source<Profile>(profile_)); |
| notification_registrar_.Remove( |
| this, chrome::NOTIFICATION_HISTORY_URLS_DELETED, |