summaryrefslogtreecommitdiffstats
path: root/sync
Commit message (Collapse)AuthorAgeFilesLines
* Adapting the UI to bring it closer to the spec, and fixing image fetching.petewil@chromium.org2013-07-241-0/+23
| | | | | | | | | | | | | | | | | | | | | | Firstly, this uses more correct fields for displaying synced notifications. The Annotation field is better than the description or text fields in most cases. Secondly, this fixes some image fetch problems. I was using images from the expanded_notification section instead of the collapsed_notification section, and the schemaless URLs were being interpreted by the chrome code as UNC paths! I added a function to add a default schema of https: if none was provided to prevent the GURL code from thinking "//" meant a UNC path on windows. Thirdly, I noticed some changes to the server side protobuf that we were not in sync with, so I copied the new fields into the protobuf that we use. (This includes the annotation field). BUG=262303,247668 Review URL: https://chromiumcodereview.appspot.com/19771013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213288 0039d316-1c4b-4281-b951-d872f2087c98
* Update include paths in sync for base/process changes.rsesek@chromium.org2013-07-231-1/+1
| | | | | | | | | BUG=242290 R=akalin@chromium.org Review URL: https://codereview.chromium.org/19800004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213118 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Add pre-commit update avoidance mode + flagrlarocque@chromium.org2013-07-2022-14/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL allows the syncer to avoid requesting updates from the server prior to a commit if the nudge tracker determines that such a request is not necessary. In general, the nudge tracker will consider such a request to be unnecessary unless the sync cycle was triggered by a local refresh request or an invalidation, or invalidations are disabled. This behavior is enabled only if explicitly requested by the client or the server. The client can enable this mode with the command-line flag '--sync-enable-get-update-avoidance'. The server can toggle it on or off with the 'pre_commit_update_avoidance' experiment. Unless at least one of these flags are set, this CL will have no effect on syncer behavior. When this experimental mode is enabled, the SyncScheduler will use the "short poll" interval rather than the "long poll". This should help clients keep in sync with each other even if the experiment breaks. Also included in this CL are some extensions to the python test server to enable manual testing of the pre_commit_update_avoidance experiment node. BUG=147685 Review URL: https://chromiumcodereview.appspot.com/19309002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212746 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed fetching of OAuth2 tokens through the MockAccountManager.joaodasilva@chromium.org2013-07-191-5/+9
| | | | | | | | | | | | | | | The native side requests oauth2 tokens without an activity. The intent started to ask for permission in these cases must have the Intent.FLAG_ACTIVITY_NEW_TASK flag. Additionally, when a response bundle has an intent but has no activity then start the intent using the main context. BUG=261458 Review URL: https://chromiumcodereview.appspot.com/19699005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212509 0039d316-1c4b-4281-b951-d872f2087c98
* Add version field to syncer::Invalidation.stepco@chromium.org2013-07-189-13/+87
| | | | | | | | BUG=260021 Review URL: https://chromiumcodereview.appspot.com/19381005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212448 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add CoreTypes supportzea@chromium.org2013-07-182-2/+30
| | | | | | | | | | | | | Previously we manually added "always enable" types from within the DataTypeManager. Now the notion of types to always enable is pulled into its own construct, CoreTypes (and it's sibling PriorityCoreTypes). Tests have been updated to exercise this, and SyncedNotifications has been added as the first Core type. BUG=245762 Review URL: https://chromiumcodereview.appspot.com/19227004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212232 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Unify all string log tags to use a simple constant.yfriedman@chromium.org2013-07-187-7/+7
| | | | | | | | | | | | Per attached bug, this is cheaper and it's good to a have a consistent style. BUG=146559 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/19485004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212215 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of the message_loop header in ppapi/, printing/, rlz/, ↵avi@chromium.org2013-07-1834-36/+36
| | | | | | | | | | | | sync/. BUG=260807 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/19627002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212193 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Only notify when setSyncAutomatically changes.yfriedman@chromium.org2013-07-171-2/+11
| | | | | | | | | | | | This makes the mock mirror production code better and cuts out on logcat spam while running instrumentation tests as we keep notfying indefinitely. NOTRY=true Review URL: https://chromiumcodereview.appspot.com/5144752345317376 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211889 0039d316-1c4b-4281-b951-d872f2087c98
* Rename base::Delete to base::DeleteFilebrettw@chromium.org2013-07-162-4/+4
| | | | | | | | | | | Also renames DeleteAfterReboot to DeleteFileAfterReboot, and removes FileUtilProxy::RecursiveDelete which was never called. BUG= R=shess@chromium.org Review URL: https://codereview.chromium.org/18584011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211822 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Add remote modification time to SyncData.tim@chromium.org2013-07-153-9/+33
| | | | | | | | | | | | | | | | | This is required for building session sync on top of Sync API. TBR=zea@chromium.org ^ themes OWNERS ^ history OWNERS ^ managed_mode OWNERS BUG=98892, 80194 Review URL: https://codereview.chromium.org/18873006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211722 0039d316-1c4b-4281-b951-d872f2087c98
* Remove DEPS rules that are redundant with the defaults in src/DEPS.tfarina@chromium.org2013-07-142-2/+0
| | | | | | | | | | | | Update googleurl references in DEPS files and update one prohibition that had gotten out of sync. BUG=229660 TBR=marja@chromium.org,jyasskin@chromium.org,blundell@chromium.org,zea@chromium.org Review URL: https://chromiumcodereview.appspot.com/18919006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211611 0039d316-1c4b-4281-b951-d872f2087c98
* Migrate from googleurl/ includes to url/ ones in the remaining top-level ↵tfarina@chromium.org2013-07-135-5/+5
| | | | | | | | | | | directories. BUG=229660 TBR=darin@chromium.org Review URL: https://codereview.chromium.org/18919005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211572 0039d316-1c4b-4281-b951-d872f2087c98
* Sync periodic polls always fail because of expired access tokens.pavely@chromium.org2013-07-135-1/+64
| | | | | | | | | | | | | | The issue is that poll job runs after few hours of inactivity and therefore will always fail with auth error because of expired access token. Once fresh access token is requested poll job is not retried. The change is to remember that poll timer just fired and retry poll job after credentials are updated. BUG=251307 Review URL: https://chromiumcodereview.appspot.com/18041006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211569 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Run-length compression for UniquePositionsrlarocque@chromium.org2013-07-134-74/+459
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces and makes use of a new compression scheme designed specifically for the UniquePositions use case. The compression scheme assumes that the abnormally long positions will contain long strings of 0xFF or 0x00 digits, so run-length encoding should be sufficient compression for our needs. There's no need to resort to anything more complicated like Huffman or Lempel-Ziv. This new compression scheme is intended to improve some of the areas where gzip compression was weakest. These include serialization and deserialization time (which may have an impact on startup time), and the costs of storing these positions in memory (which gzip did nothing to mitigate). The new compression scheme should also result in a significant improvement in the time taken to compare long position strings. Unfortunately, this new compression scheme increases the cost of creating new positions. While comparison of compressed positions is supported, the insertion of items before, after, or between a compressed item requires that the relevant positions be temporarily uncompressed. BUG=145412 Review URL: https://chromiumcodereview.appspot.com/15935009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211513 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Lock-free shutdown of profile sync service. Changes include:"zea@chromium.org2013-07-1316-77/+40
| | | | | | | | | | | | | | | | | | Introduced shutdown crashes. See bug crbug.com/259974 for discussion. Original codereview at https://chromiumcodereview.appspot.com/16770005 This also reverts "Disconnect non-frontend processor using the processor in " due to its depdency on the above patch. Original codereview at https://chromiumcodereview.appspot.com/5878607637381120 BUG=19757,259974 TBR=haitaol@chromium.org Review URL: https://codereview.chromium.org/18890004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211506 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Cleanup unused experiment logiczea@chromium.org2013-07-112-25/+2
| | | | | | | | | | | | Types are all enabled by default already, so the experiments logic was unnecessary. BUG=none TBR=bauerb@chromium.org Review URL: https://chromiumcodereview.appspot.com/18854004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211191 0039d316-1c4b-4281-b951-d872f2087c98
* Lock-free shutdown of profile sync service. Changes include:haitaol@chromium.org2013-07-1016-40/+77
| | | | | | | | | | | | | | | | | | * Disconnect non-frontend processor/associator to stop accessing directory so that sync backend can be shut down without waiting. * Change non-frontend controller so that creation/destruction of processor/associator doesn't depend on valid controller. So scoped wait on stopping controller can be removed. * Move sync thread to PSS. It's created when starting first backend and destroyed on last browser thread. BUG=19757 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210333 Review URL: https://chromiumcodereview.appspot.com/16770005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210955 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add password support to sync apizea@chromium.org2013-07-105-3/+12
| | | | | | | | | | | This change modifies the password protobuf definition and the sync generic change processor in order to support passwords custom encryption scheme. BUG=117445 Review URL: https://chromiumcodereview.appspot.com/18551007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210915 0039d316-1c4b-4281-b951-d872f2087c98
* Switch Android ProfileSyncService to OAuth2pavely@chromium.org2013-07-091-2/+2
| | | | | | | | BUG=226469 Review URL: https://chromiumcodereview.appspot.com/17628003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210669 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 210333 "Lock-free shutdown of profile sync service. Chang..."kinuko@chromium.org2013-07-0816-77/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Suspected to have introduced (flaky) SEGV crash in ProfileSyncServiceTypedUrlTest.IgnoreLocalhostURL http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20(1)/builds/28925/steps/unit_tests/logs/stdio http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20(dbg)(1)/builds/21682/steps/unit_tests/logs/IgnoreLocalhostURL http://build.chromium.org/p/chromium.win/builders/Win%207%20Tests%20x64%20%283%29/builds/7252/steps/unit_tests/logs/IgnoreLocalhostURL > Lock-free shutdown of profile sync service. Changes include: > * Disconnect non-frontend processor/associator to stop accessing directory > so that sync backend can be shut down without waiting. > * Change non-frontend controller so that creation/destruction of > processor/associator doesn't depend on valid controller. So > scoped wait on stopping controller can be removed. > * Move sync thread to PSS. It's created when starting first backend and > destroyed on last browser thread. > > BUG=19757 > > Review URL: https://chromiumcodereview.appspot.com/16770005 TBR=haitaol@chromium.org Review URL: https://codereview.chromium.org/18489004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210346 0039d316-1c4b-4281-b951-d872f2087c98
* Lock-free shutdown of profile sync service. Changes include:haitaol@chromium.org2013-07-0816-40/+77
| | | | | | | | | | | | | | | | * Disconnect non-frontend processor/associator to stop accessing directory so that sync backend can be shut down without waiting. * Change non-frontend controller so that creation/destruction of processor/associator doesn't depend on valid controller. So scoped wait on stopping controller can be removed. * Move sync thread to PSS. It's created when starting first backend and destroyed on last browser thread. BUG=19757 Review URL: https://chromiumcodereview.appspot.com/16770005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210333 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Expose sync functionality as functionsrlarocque@chromium.org2013-07-0327-793/+873
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is a refactor to clean up ugliness introduced in previous commits and prepare for future features. The most notable change is the removal of "state machine" logic from syncer.cc. This allows us to remove the SyncerSteps enum and related code. The SyncShare function + enum parameters have been replaced with the functions NormalSyncShare(), ConfigureSyncShare() and PollSyncShare(). These changes should make it possible to address crbug.com/109422, and to re-enable commits during poll-triggered sync cycles (if desrired, see r206475). The logic for fetching and applying updates has been modified, too. Since the behaviour of GetUpdates varies depending on the type of cycle (Configure, GetUpdates, or Poll) the logic to build and execute these GetUpdate requests has been split up. This enables us to remove the NudgeTracker from the SyncSession (an ugly hack introduced in r199136). It should make it easier to implement crbug.com/147685. In the interest of keeping this change as small and simple as possible some obvious refactorings have not been intentionally excluded from this CL. For example, the logic around when to send SYNC_CYCLE_ENDED events or when to return true or false frome the SyncShare functions remains very complicated. Untangling that mess would require some non-trivial changes to the SyncScheduler, so they've been deferred until later. BUG=147685,109422 Review URL: https://chromiumcodereview.appspot.com/17052007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209867 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add support for sync Persistence Errorszea@chromium.org2013-07-025-40/+88
| | | | | | | | | | | | | | Persistence errors are those detected by the native model's transaction version being newer than sync's. They currently have no effect beyond a normal association error, but will eventually result in delayed association after a sync update. BUG=239828 TBR=atwilson@chromium.org, sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/15701022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209810 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Fix bug in sense of setting isSyncable.yfriedman@chromium.org2013-07-021-1/+1
| | | | | | | | | | | | | | | The API specifies that >0 means syncable is true. After https://codereview.chromium.org/16092014/ when Android sync settings change, we have to read-back values to make sure we have the right settings. This started causing tests to fail as we stored the wrong value. BUG=238506 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/18429002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209569 0039d316-1c4b-4281-b951-d872f2087c98
* Update OS X to use scoped_refptr<T>::get() rather than implicit "operator T*"rsleevi@chromium.org2013-07-021-1/+1
| | | | | | | | | | | | Fixes a number of cases either not caught by the automated tool or that have recently regressed. BUG=206189 TBR=darin Review URL: https://codereview.chromium.org/18346006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209554 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the OWNERS that no longer work on the project.aurimas@chromium.org2013-07-013-3/+0
| | | | | | | | | Remove jcivelli@, and nileshagrawal@ who no longer work on Chrome for Android. Review URL: https://chromiumcodereview.appspot.com/18178014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209531 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_util::Delete to the base namespacebrettw@chromium.org2013-07-012-4/+4
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/16950028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209475 0039d316-1c4b-4281-b951-d872f2087c98
* Use InvalidationService (retry of r208315)rlarocque@chromium.org2013-06-2924-594/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The InvalidationService was introduced r199520. That commit added the InvalidationService interface and several implementations of it, but made no use of the new code. This commit builds on that work. Up until now, TICL invalidations were handled on the sync thread. The related objects were instantiated and owned by the SyncBackendHost and SyncManager. All requests to update the set of object registrations had to be passed to the sync thread. Components that wanted to receive invalidations but were not part of sync had to route their communication with the invalidations server through ProfileSyncService to get to the sync thread. Things were a bit different on Android, but the system still tried to pretend that invalidations were owned by the sync thread. The new InvalidationService implementation is a ProfileKeyedService that is mostly independent from sync. It still relies on sync to manage sign in and fetch the appropriate auth tokens. However, it's now much easier for components outside of sync to communication with the invalidations server. The new system allows us to remove a lot of invalidations-related code from the ProfileSyncService, SyncBackendHost and SyncManager. Sync is now just one of many clients of the InvalidationService. The SyncBackendHost is responsible for forwarding messages back and forth between the InvalidationService and the sync thread. TBR=dcheng,satorux1,battre,rsimha,bauerb,sky,erg BUG=124137 Review URL: https://chromiumcodereview.appspot.com/17699005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209264 0039d316-1c4b-4281-b951-d872f2087c98
* [Android] Introduce in-memory cache for Android sync settings.yfriedman@chromium.org2013-06-294-97/+403
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking Android sync settings appears to be cheap but masks potential slow calls and jank on the ui-thread due to many parties querying sync state. One example for slowness is due to this issuing IPCs to a separate service which may need to be re-started and load state from disk. Testing on a Galaxy Nexus shows ~50-70ms aggregrate time spent querying Android sync state reducing to <5ms for loading an initial page. There are additional checks throughout the lifetime of the app that now become in-memory lookups. Regarding the implementation: - Master Sync Automatically is account agnostic and can be cached once at startup, and only updated when a notification is received that settings have changed. - The remaining settings are per-account. On access of any of these settings, we grab the latest values for the requested account, and also update when a notification is received. Updates are infrequent and only when the signed in account changes. BUG=238506 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/16092014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209249 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of time headers in rlz/, skia/, sql/, sync/.avi@chromium.org2013-06-2832-38/+38
| | | | | | | | | | BUG=254986 TEST=none TBR=ben@chromium.org Review URL: https://codereview.chromium.org/18031009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209152 0039d316-1c4b-4281-b951-d872f2087c98
* components/autofill: Break the dependency on sync utility file.tfarina@chromium.org2013-06-275-113/+0
| | | | | | | | | | | | | | Do this moving data_encryption_win* into core/browser, since it's only used from there. BUG=140037 TEST=unit_tests,checkdeps.py R=joi@chromium.org,isherman@chromium.org,akalin@chromium.org NOTRY=true Review URL: https://chromiumcodereview.appspot.com/17745004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208948 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 208315 "Make use of InvalidationService"rlarocque@chromium.org2013-06-2524-109/+594
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > Make use of InvalidationService > > The InvalidationService was introduced r199520. That commit added the > InvalidationService interface and several implementations of it, but > made no use of the new code. This commit builds on that work. > > Up until now, TICL invalidations were handled on the sync thread. The > related objects were instantiated and owned by the SyncBackendHost and > SyncManager. All requests to update the set of object registrations had > to be passed to the sync thread. Components that wanted to receive > invalidations but were not part of sync had to route their communication > with the invalidations server through ProfileSyncService to get to the > sync thread. Things were a bit different on Android, but the system > still tried to pretend that invalidations were owned by the sync thread. > > The new InvalidationService implementation is a ProfileKeyedService that > is mostly independent from sync. It still relies on sync to manage sign > in and fetch the appropriate auth tokens. However, it's now much easier > for components outside of sync to communication with the invalidations > server. > > The new system allows us to remove a lot of invalidations-related code > from the ProfileSyncService, SyncBackendHost and SyncManager. Sync is > now just one of many clients of the InvalidationService. The > SyncBackendHost is responsible for forwarding messages back and forth > between the InvalidationService and the sync thread. > > TBR=sky,erg > BUG=124137 > > Review URL: https://chromiumcodereview.appspot.com/15580002 TBR=rlarocque@chromium.org Review URL: https://codereview.chromium.org/17610004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208347 0039d316-1c4b-4281-b951-d872f2087c98
* Make use of InvalidationServicerlarocque@chromium.org2013-06-2524-594/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The InvalidationService was introduced r199520. That commit added the InvalidationService interface and several implementations of it, but made no use of the new code. This commit builds on that work. Up until now, TICL invalidations were handled on the sync thread. The related objects were instantiated and owned by the SyncBackendHost and SyncManager. All requests to update the set of object registrations had to be passed to the sync thread. Components that wanted to receive invalidations but were not part of sync had to route their communication with the invalidations server through ProfileSyncService to get to the sync thread. Things were a bit different on Android, but the system still tried to pretend that invalidations were owned by the sync thread. The new InvalidationService implementation is a ProfileKeyedService that is mostly independent from sync. It still relies on sync to manage sign in and fetch the appropriate auth tokens. However, it's now much easier for components outside of sync to communication with the invalidations server. The new system allows us to remove a lot of invalidations-related code from the ProfileSyncService, SyncBackendHost and SyncManager. Sync is now just one of many clients of the InvalidationService. The SyncBackendHost is responsible for forwarding messages back and forth between the InvalidationService and the sync thread. TBR=sky,erg BUG=124137 Review URL: https://chromiumcodereview.appspot.com/15580002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208315 0039d316-1c4b-4281-b951-d872f2087c98
* mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef.thakis@chromium.org2013-06-241-5/+4
| | | | | | | | | | | | | | | | | This CL was created fully mechanically by running git grep -l base::mac::ScopedCFTypeRef | xargs sed -i -e 's/base::mac::ScopedCFTypeRef/base::ScopedCFTypeRef/g' git commit -a -m. git clang-format HEAD^ --style=Chromium git commit -a -m. git cl upload -t $TITLE BUG=251957 TBR=mark@chromium.org Review URL: https://codereview.chromium.org/16917011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208245 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Have SBH tell SyncManager which types to purgezea@chromium.org2013-06-226-61/+33
| | | | | | | | | | | | | The SBH now specifies as part of the ConfigureSyncer call which types need to be purged. This is determined by whether this is a control types config (in which case all disabled types are purged) or whether any types have been disabled since the last configuration (as determined by the SBR). BUG=247115 Review URL: https://chromiumcodereview.appspot.com/17552014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208074 0039d316-1c4b-4281-b951-d872f2087c98
* Define a LoggingSettings struct to use for InitLogging()akalin@chromium.org2013-06-213-18/+10
| | | | | | | | | | | | | | | | | | Update all callers of InitLogging() to use LoggingSettings, only setting fields that need a non-default value. Turn LoggingDestination enum into a bit field and define add LOG_DEFAULT and LOG_ALL constants. Fix erroneous comment saying that the default was to not lock the log file. BUG=247594 TBR=brettw@chromium.org, cpu@chromium.org, gene@chromium.org, jam@chromium.org, rch@chromium.org, scherkus@chromium.org, sergeyu@chromium.org, sky@chromium.org, tkent@chromium.org, yfriedman@chromium.org, zea@chromium.org Review URL: https://codereview.chromium.org/16519003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207920 0039d316-1c4b-4281-b951-d872f2087c98
* [Autofill] Sync Autofill profiles' origins.isherman@chromium.org2013-06-212-0/+2
| | | | | | | | | | BUG=170401 TEST=unit tests R=estade@chromium.org Review URL: https://chromiumcodereview.appspot.com/16024018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207909 0039d316-1c4b-4281-b951-d872f2087c98
* Add base namespace to more values in sync and elsewhere.brettw@chromium.org2013-06-2142-138/+145
| | | | | | | | | | This makes sync and net compile with no "using *Value". BUG= Review URL: https://codereview.chromium.org/17034006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207907 0039d316-1c4b-4281-b951-d872f2087c98
* Replace sync experiments with prefs backed by switches and migration code.pastarmovj@chromium.org2013-06-201-1/+0
| | | | | | | | | | | | | Those "pseudo" flags were disturbing a lot our efforts to liberate flags on chromeos. Therfore they are moved with this CL into prefs that are backed by the corresponding flags to make the transition smoother and clean up the affected flags. BUG=251261 TEST=No restart on innocent users. Review URL: https://chromiumcodereview.appspot.com/17423006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207621 0039d316-1c4b-4281-b951-d872f2087c98
* [Autofill] Deprecate the "label" field for Sync.isherman@chromium.org2013-06-202-5/+1
| | | | | | | | | | BUG=none TEST=compiles R=zea@chromium.org Review URL: https://chromiumcodereview.appspot.com/15981019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207346 0039d316-1c4b-4281-b951-d872f2087c98
* Add model version to association stats and client debug info.haitaol@chromium.org2013-06-177-1/+33
| | | | | | | | BUG=249978 Review URL: https://chromiumcodereview.appspot.com/16854019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206774 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for master key upon LMU creationantrim@chromium.org2013-06-171-0/+2
| | | | | | | | | | BUG=243342 R=bauerb@chromium.org, nkostylev@chromium.org TBR=atwilson@chromium.org Review URL: https://chromiumcodereview.appspot.com/17061006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206722 0039d316-1c4b-4281-b951-d872f2087c98
* [sql] Add histogram tags to sync databases.shess@chromium.org2013-06-162-0/+7
| | | | | | | | | | This allow tracking SQLite errors and other info in the wild. BUG=none Review URL: https://chromiumcodereview.appspot.com/16987009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206629 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Reduce work done to process bookmark changesrlarocque@chromium.org2013-06-1511-120/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ChangeReorderBuffer and BookmarkChangeProcessor collaborate to handle bookmark-specific ordering and hierarchy requirements. With a bit of help from the directory and some changes to these classes, we can achieve the same effect as before with less work. Prior to this CL, the BookmarkChangeProcessor would apply a position-affecting from sync to the bookmark model by updating all siblings of the position change in left to right order. The idea was to have all the predecessors of the modified item in sync before applying the change. The ChangeReorderBuffer helps out by manufacturing fake changes for siblings of position changes, and delivering them all to the BookmarkChangeProcessor in syncable::Directory left-to-right order. This CL works solves the issue by splitting the work up into two separate passes. On the first pass, any modified nodes are moved to the far right within their parent folder. The second pass iterates over these modified items in syncable::Directory left-to-right position order, and moves them to the proper index in the bookmark model. This has the same effect as the earlier algorithm: all predecessors are synced at the time of the final move operation. This should be much cheaper than modifying all the siblings of a position change. This new algorithm also allows us to remove lots of sibling ordering requirements from the ChangeReorderBuffer and related functions, since the BookmarkChangeProcessor no longer requires its changes to be delivered in sibling order. It also no longer needs to manufacture fake changes for siblings of position changes. This CL also includes a few cosmetic changes to the BookmarkChangeProcessor. BUG=123429 Review URL: https://chromiumcodereview.appspot.com/16507010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206572 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Handle type throttling in NudgeTrackerrlarocque@chromium.org2013-06-1439-490/+498
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change removes the ThrottledDataTypeTracker and moves much of its functionality into the NudgeTracker. This allows us to better control throttling behavior and fix crbug.com/155296. This CL re-routes syncer_proto_util type throttling callbacks through the SyncSession::Delegate to the SyncScheduler. It adds a timer and some related functions to the SyncScheduler, so the scheduler can now wake up, unthrottle types, and attempt a sync cycle at the exact time when throttling expires. The information about which types are currently throttled has been moved to the NudgeTracker. This allows the NudgeTracker to take type throttling into account in functions like NudgeTracker::IsSyncRequired() and NudgeTracker::RecordSuccessfulSyncCycle(). The DownloadUpdatesCommand's special case for nudge-type syncs has been extended to take throttling into account. GetCommitIdsCommand has been updated to fetch its list of throttled types from the nudge tracker. Unfortunately, this meant that committing from poll-triggered sync sessions had to be disabled, since poll sync cycles do not have access to the nudge tracker. BUG=155296, 116184 Review URL: https://chromiumcodereview.appspot.com/16402013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206475 0039d316-1c4b-4281-b951-d872f2087c98
* Use OAuth2 token for syncpavely@chromium.org2013-06-1315-63/+48
| | | | | | | | | | | | | | | | | | | | ProfileSyncService requests access token from OAuth2TokenService and passes it to ServerConnectionManager through UpdateCredentials. When server returns AUTH_ERROR it gets propagated to ProfileSyncService through OnGetStatusChange call. At this point ProfileSyncService needs to invalidate old token with OAuth2TokenService and request a new one. Access token is requested in PSS::StartUp since this is the place where all preconditions are verified. There is a call to pre-request access token in Initialize and Observe after Login token is loaded. There are still two tests disabled, I'll fix them and update this CR. BUG=226464 TBR=jhawkins@chromium.org Review URL: https://chromiumcodereview.appspot.com/15421011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206224 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite scoped_ptr<T>(NULL) to use the default ctor in sync/.dcheng@chromium.org2013-06-123-8/+2
| | | | | | | | | | | This is the result of running the rewrite_scoped_ptr_ctor_null tool across all files built on Linux in the sync/ directory. BUG=173286 Review URL: https://chromiumcodereview.appspot.com/16654009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205919 0039d316-1c4b-4281-b951-d872f2087c98
* Rename base/hash_tables to base/containers/hash_tables.brettw@chromium.org2013-06-112-2/+2
| | | | | | | | | | | Remove forwarding header BUG= R=avi@chromium.org Review URL: https://codereview.chromium.org/16667019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205584 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in rlz/, sandbox/, skia/, sql/, sync/.avi@chromium.org2013-06-1142-46/+45
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16358024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205458 0039d316-1c4b-4281-b951-d872f2087c98