[BackgroundSyncManager] Tags with different periodicities can overlap
commitaf28ebaebd2055a499978b740eb87df66171c8af
authorjkarlin <jkarlin@chromium.org>
Fri, 10 Apr 2015 21:57:30 +0000 (10 14:57 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 10 Apr 2015 21:58:05 +0000 (10 21:58 +0000)
treeb5db07c3297aefa50df2917d6ddcab825fd147a8
parent750ec3bcc07a3fd273080aba67440e6ed23f60e9
[BackgroundSyncManager] Tags with different periodicities can overlap

The background sync spec (see https://github.com/slightlyoff/BackgroundSync/pull/74) allows for
registrations to coexist with the same tag so long as they have different periodicities (one-shot vs periodic).

This CL changes Registration::fire_once to Registration::periodicity and indexes registrations by RegistrationKey instead of by tag. RegistrationKey incorporates both the tag and the periodicity.

BUG=474573

Review URL: https://codereview.chromium.org/1065313002

Cr-Commit-Position: refs/heads/master@{#324691}
content/browser/background_sync/background_sync.proto
content/browser/background_sync/background_sync_manager.cc
content/browser/background_sync/background_sync_manager.h
content/browser/background_sync/background_sync_manager_unittest.cc