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

Side by Side Diff: components/dom_distiller/core/dom_distiller_store.cc

Issue 2440303002: Remove usage of FOR_EACH_OBSERVER macro in components/ (Closed)
Patch Set: remove superfluous return Created 4 years, 1 month 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
« no previous file with comments | « components/dom_distiller/core/distilled_page_prefs.cc ('k') | components/exo/surface.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/dom_distiller/core/dom_distiller_store.h" 5 #include "components/dom_distiller/core/dom_distiller_store.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 DomDistillerObserver::ArticleUpdate::REMOVE; 340 DomDistillerObserver::ArticleUpdate::REMOVE;
341 break; 341 break;
342 case SyncChange::ACTION_INVALID: 342 case SyncChange::ACTION_INVALID:
343 NOTREACHED(); 343 NOTREACHED();
344 break; 344 break;
345 } 345 }
346 const ArticleEntry& entry = GetEntryFromChange(*it); 346 const ArticleEntry& entry = GetEntryFromChange(*it);
347 article_update.entry_id = entry.entry_id(); 347 article_update.entry_id = entry.entry_id();
348 article_changes.push_back(article_update); 348 article_changes.push_back(article_update);
349 } 349 }
350 FOR_EACH_OBSERVER(DomDistillerObserver, observers_, 350 for (DomDistillerObserver& observer : observers_)
351 ArticleEntriesUpdated(article_changes)); 351 observer.ArticleEntriesUpdated(article_changes);
352 } 352 }
353 } 353 }
354 354
355 void DomDistillerStore::ApplyChangesToModel(const SyncChangeList& changes, 355 void DomDistillerStore::ApplyChangesToModel(const SyncChangeList& changes,
356 SyncChangeList* changes_applied, 356 SyncChangeList* changes_applied,
357 SyncChangeList* changes_missing) { 357 SyncChangeList* changes_missing) {
358 model_.ApplyChangesToModel(changes, changes_applied, changes_missing); 358 model_.ApplyChangesToModel(changes, changes_applied, changes_missing);
359 NotifyObservers(*changes_applied); 359 NotifyObservers(*changes_applied);
360 } 360 }
361 361
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 result.set_num_items_deleted(0); 485 result.set_num_items_deleted(0);
486 486
487 result.set_pre_association_version(0); 487 result.set_pre_association_version(0);
488 result.set_num_items_after_association(model_.GetNumEntries()); 488 result.set_num_items_after_association(model_.GetNumEntries());
489 result.set_error(error); 489 result.set_error(error);
490 490
491 return result; 491 return result;
492 } 492 }
493 493
494 } // namespace dom_distiller 494 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « components/dom_distiller/core/distilled_page_prefs.cc ('k') | components/exo/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698