summaryrefslogtreecommitdiffstats
path: root/sync/protocol
Commit message (Collapse)AuthorAgeFilesLines
* [sync] Componentize sync: Part 2: Add SYNC_EXPORTs to files in src/sync/rsimha@chromium.org2012-12-114-8/+13
| | | | | | | | | | | | | | | | | | | | | One of the long term goals of the sync team is to pull sync code out of chrome.dll and into its own component. As of today, several chrome targets depend on various sync targets as defined in sync.gyp. We'd like to move to a world where all chrome targets outside sync.gyp simply depend on the target sync.gyp:sync, which is built into its own component. This patch sets the stage for full componentization by adding SYNC_EXPORT annotations to classes / methods within src/sync. The final step of breaking off sync into its own component will be done in https://codereview.chromium.org/11412211. BUG=136928 Review URL: https://chromiumcodereview.appspot.com/11515009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172458 0039d316-1c4b-4281-b951-d872f2087c98
* sync: add syncer::Experiment to control autofill culling.tim@chromium.org2012-12-061-0/+7
| | | | | | | | | | | | | | | | This changes the behavior in several ways, one being that the ultimate decision of whether or not to cull expired autofill entries is now made by sync servers. However, we only feed this data through at MergeDataAndStartSyncing time, meaning once per sync startup (typically browser startup). The next time autofill components will learn of any value change by sync servers is the next time Chrome starts (MergeDataAndStartSyncing is called again). BUG=28990 Review URL: https://chromiumcodereview.appspot.com/11418249 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171611 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add search_terms field to session_specifics.protomathp@chromium.org2012-12-062-0/+3
| | | | | | | | | | | Syncing the search terms that were extracted from a URL. BUG=159326,153477 Review URL: https://chromiumcodereview.appspot.com/11437022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171359 0039d316-1c4b-4281-b951-d872f2087c98
* Track merged nudge sourcesrlarocque@chromium.org2012-11-301-0/+24
| | | | | | | | | | | | | | | | | There's a lot of valuable information in coalesced nudges. Currently, one nudge source can overwrite another, which leaves us in the dark as to why the client behaved a certain way. In fact, today we can't even determine whether or not any coalescing was done. By logging all the coalesced sources and their payloads, we can learn a lot more about client behaviour. I'm hoping to use this to improve our notification effectiveness metrics. BUG=138613 Review URL: https://chromiumcodereview.appspot.com/11416126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170549 0039d316-1c4b-4281-b951-d872f2087c98
* Sync the bookmark's icon URL.pkotwicz@chromium.org2012-11-303-0/+7
| | | | | | | | | BUG=160726 Test=TwoClientBookmarksSyncTest.* Review URL: https://chromiumcodereview.appspot.com/11428004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170326 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add debug info proto conversionzea@chromium.org2012-11-215-3/+99
| | | | | | | | | | | | This allows us to see the debug info we send up to the server as part of the traffic recorder's events. BUG=158576 Review URL: https://chromiumcodereview.appspot.com/11348144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169103 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Update ChipBag protozea@chromium.org2012-11-141-2/+17
| | | | | | | | | | | Add an optional bytes server_chips field to represent the opaque server data. BUG=None Review URL: https://chromiumcodereview.appspot.com/11361234 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167586 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Linux: change protobuf default option to allow building"nyquist@chromium.org2012-11-1224-0/+72
| | | | | | | | | | | | | | | | | This reverts commit baefae90f294a981c973bffbdd3eccabfe796b6a. The change broke Chrome for Android because non-vanilla protobuf-lite Java files were generated. Original review: https://codereview.chromium.org/11228038/ TBR=phajdan.jr BUG=160256 Review URL: https://codereview.chromium.org/11359146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167242 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: change protobuf default option to allow buildingphajdan.jr@chromium.org2012-11-0724-72/+0
| | | | | | | | | | | | | | | | | | with unpatched system protobuf. This is a preparation for landing https://codereview.chromium.org/11231046/ and a solution chosen because our custom protobuf changes will not be accepted upstream. Setting defaults to optimize for lite runtime and retain unknown fields makes it possible to use the same .proto files with system protobuf. BUG=157155 TEST=none Review URL: https://codereview.chromium.org/11228038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166534 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add datatype association stats to client debug info proto.zea@chromium.org2012-11-061-11/+43
| | | | | | | | | | | | We now track when datatypes associate, which datatypes associate, and what the association results are. BUG=158576 Review URL: https://chromiumcodereview.appspot.com/11359067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166152 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Follow-up to conflict resolution refactorrlarocque@chromium.org2012-11-013-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part two of r164286. That commit refactored the way we handle conflict resolution. This commit takes advantage of those changes to delete lots of code. Because this change deletes session_state.cc, I decided to move the two remaining useful tests session_state_unittest.cc into their own files, sync_session_snapshot_unittest.cc and sync_source_info_unittest.cc. The tests were not modified in any way. None of these changes should have any effect on syncer behaviour: - We can remove the simple conflict counters and related code, since we now assert that all conflicts will be resolved by the end of a successful sync cycle. - We can remove the PerModelSafeGroupState because that struct no longer has any members. - The 'conflicts_resolved' indicators are no longer set, so we can remove them. - Without those indicators, it's no longer possible to have any SYNC_CYCLE_CONTINUATION sync cycles. We can remove a few counters associated with them, as well as the 'has_more_to_sync' flag in the snapshot. - Without SYNC_CYCLE_CONTINUATION cycles, there's no longer any need for code that loops around SyncShare() in SyncSchedulerImpl. The SyncSession::PrepareForAnotherSyncCycle() function is no longer used, either. - The ScopedConflictResolver installed on the session during a sync cycle is no longer used, so all the code related to it can be deleted. BUG=147681,111280,156238 Review URL: https://chromiumcodereview.appspot.com/11314008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165474 0039d316-1c4b-4281-b951-d872f2087c98
* Add experiment for history delete directives.albertb@chromium.org2012-10-221-0/+6
| | | | | | | | | | R=zea BUG=none Review URL: https://chromiumcodereview.appspot.com/11237006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163425 0039d316-1c4b-4281-b951-d872f2087c98
* Initial support for the 'Experiments' data typerlarocque@chromium.org2012-10-196-15/+76
| | | | | | | | | | | | | | | | | | | | | | This internal sync type will track flags that enable or disable experimental features. This commit includes the protobuf definitions and other infrastructure required to support the type. It also includes some support for one experimental flag that will be used to enable or disable encryption. The code to actually inspect the flag and take action on its value will be included in a later commit. The type is not actually enabled in this patch because the server does not yet support it. Once server support is available, a small follow-up commit will be required to enable the feature. BUG=122825 Review URL: https://chromiumcodereview.appspot.com/11144024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162874 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add comment pointing to detailed info for PageTransition enumsakalin@chromium.org2012-10-181-0/+4
| | | | | | | | | BUG= Review URL: https://chromiumcodereview.appspot.com/11184035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162629 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add history delete directive typeakalin@chromium.org2012-10-177-1/+99
| | | | | | | | | | | | | | | | | | Add new HISTORY_DELETE_DIRECTIVE model type. Update everything that depends on model type. Rename SyncCryptographer test to Cryptographer (since it's already in sync_unit_tests). Add EncryptableUserTypes() function and use that instead of UserTypes() for encryption-related stuff. BUG=141245 TBR=jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/10855037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162323 0039d316-1c4b-4281-b951-d872f2087c98
* Extend sync protocol to report hierarchy conflictsrlarocque@chromium.org2012-10-163-5/+31
| | | | | | | | | | | | | | | | | | | | | | This commit adds a new submessage to the protocol buffer that can be used to report the client's status to the server. The first status indicator to be implemented is 'hierarchy_conflict_detected', which is an implicit call for help. In the future, the server should respond to this flag by tring to resolve the hierarchy conflicts. To help manually test the new field, this change also modified the proto to DictionaryValue conversion functions to no longer print unset fields. This is important because the client must leave the 'hierarchy_conflict_detected' field unset until it has tried to apply updates at least once. This also had some implications for the unit tests. BUG=152464 Review URL: https://chromiumcodereview.appspot.com/11090052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162053 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add a new global_id field to sync_pb::TabNavigationakalin@chromium.org2012-10-152-1/+4
| | | | | | | | | | | | Populate this field from TabNavigation objects (specifically, the internal value of the timestamp). BUG=128449 Review URL: https://chromiumcodereview.appspot.com/11098002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161984 0039d316-1c4b-4281-b951-d872f2087c98
* Makes sync code persist the date node was added. I'm hoping this coverssky@chromium.org2012-10-123-0/+17
| | | | | | | | | | | | | | most of the cases folks are encountering. We may need to persist date_folder_modified to really cover everything. BUG=84880 TEST=covered by tests. R=akalin@chromium.org Review URL: https://chromiumcodereview.appspot.com/11090083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161655 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Add DeviceInfo protobuf and supporting coderlarocque@chromium.org2012-10-1211-56/+86
| | | | | | | | | | | | | | | | | | | | | | This commit introduces the DeviceInfo type and protobuf. It also introduces the DeviceInfo class, which provides an interface for the rest of the code to access the information stored within the DeviceInfo type. The DeviceInfo class takes over some functions that used to belong to the SessionModelAssociator. The ChangeProcessor that keeps this information up to date and exposes notifications of device info changes will be added in a future commit. At the time of this commit, this should all be mostly dead code. The server does not support this type yet, so we do not yet attempt to download or manipulate any actual DeviceInfo nodes. BUG=122825 Review URL: https://chromiumcodereview.appspot.com/10985008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161496 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add custom passphrase time trackingzea@chromium.org2012-10-122-0/+6
| | | | | | | | | | | | | | | | We now track when a custom passphrase is set, and in conjunction with the migration time now support querying the passphrase time (returns migration time for FROZEN_IMPLICIT type, or custom passphrase time for CUSTOM_PASSPHRASE type). Plumb this information up through to the PSS for eventual use in the UI. BUG=129665 Review URL: https://chromiumcodereview.appspot.com/11098007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161478 0039d316-1c4b-4281-b951-d872f2087c98
* Introduces a search term extraction mechanism working for arbitrary search ↵beaudoin@chromium.org2012-10-092-0/+4
| | | | | | | | | | | | | | | providers. Repalces the omnibox content with the actual search term when searching on the user's default search engine. Meant to be used with instant extended. Note: Will only convert URLs that have the espv=1 query parameter. BUG=139176, 135106 Review URL: https://chromiumcodereview.appspot.com/10908226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160884 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Fix tab sync page transition types.zea@chromium.org2012-09-276-24/+38
| | | | | | | | | | | | Page transition qualifiers are independent of the transition type core, but weren't being treated as such. We now set/get them independently. In addition, we now support the non-redirect specific qualifiers. BUG=150929 Review URL: https://codereview.chromium.org/10963002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158938 0039d316-1c4b-4281-b951-d872f2087c98
* sync: add Google API Key to all ClientToServerMessages.tim@chromium.org2012-09-171-0/+3
| | | | | | | | | | | | | Also move setting of "must have" sync fields to PostClientToServerMessage (from DownloadUpdatesCommand & BuildCommitCommand). Needed for M23 branch. BUG= Review URL: https://chromiumcodereview.appspot.com/10916276 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157081 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Implement keystore migration support.zea@chromium.org2012-09-135-9/+54
| | | | | | | | | | | | | | | | | | | | | | | We'll now trigger migration if the keystore key is available, the cryptographer is ready, and the nigori node isn't already properly migrated. Note that this means we won't trigger migration without at least the implicit gaia password already available to the cryptographer, in order to support backwards compatibility with older clients. Eventually that will change. In addition, once a nigori node has been migrated, any client that supports keystore encryption will follow the new encryption constraints, whether or not the --sync-keystore-encryption flag is passed. This means that if the user sets a custom passphrase, encrypt everything will also be enabled (and vice versa). Migration-aware conflict resolution is not implemented yet. BUG=129665 Review URL: https://chromiumcodereview.appspot.com/10916036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156646 0039d316-1c4b-4281-b951-d872f2087c98
* Implement a bag of chips for sync.qsr@chromium.org2012-09-111-0/+12
| | | | | | | | | | | | | The bag of chips is a per-client state used by the server. This state is stored on the client and send back to the server on all communication. BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10916174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156123 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Generalize StringOrdinal to handle ordinal_in_parent fieldakalin@chromium.org2012-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Rename StringOrdinal to Ordinal, move it to sync/, and templatize it. Make StringOrdinal be an instantiation of Ordinal that matches its previous behavior. Create NodeOrdinal, which is another instantiation of Ordinal for the ordinal_in_parent field in SyncEntity. Rework Ordinal to handle arbitrary byte ranges and to simplify the interpolation code a bit. Generalize StringOrdinal unit tests for Ordinal. Update users of StringOrdinal to prepend syncer::. BUG=145412 TBR=estade@chromium.org,jianli@chromium.org,brettw@chromium.org, Review URL: https://chromiumcodereview.appspot.com/10920017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155368 0039d316-1c4b-4281-b951-d872f2087c98
* First part of PAGE_TRANSITION_START_PAGE cleanup.rogerta@chromium.org2012-09-052-2/+2
| | | | | | | | | | | | | | | | | | I replaced START_PAGE with AUTO_TOPLEVEL because that more accurately describes how its being used in the code. In a followed CL I will add specific support for startup pages, which was the original intention of START_PAGE. This CL is basically a large search and replace and does not change the behaviour of the code. BUG=144002 TEST=No user visible change Review URL: https://chromiumcodereview.appspot.com/10897034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155047 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move keystore key handling to SyncEncryptionHandlerImplzea@chromium.org2012-08-291-0/+2
| | | | | | | | | | | | The cryptographer has no notion of keystore keys, and we now persist the keystore key by reusing the OnBoostrapTokenUpdated method (which now takes an enum as an extra param specifying the type of token). BUG=129665 Review URL: https://chromiumcodereview.appspot.com/10878015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154007 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Refactor passphrase state handlingzea@chromium.org2012-08-261-4/+5
| | | | | | | | | | | | | | We now have an enum describing passphrase state, and cache the current value on the UI thread via a new OnPassphraseStateChanged method. Additionally, we log the OnPassphraseStateChanged event in the debug log info. BUG=139848, 129665 Review URL: https://chromiumcodereview.appspot.com/10824410 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153397 0039d316-1c4b-4281-b951-d872f2087c98
* Correct const accessors in base/values.(h|cc), Part II (ListValue)vabr@chromium.org2012-08-031-2/+2
| | | | | | | | | | | | | | For problem description and other info please see the BUG page. This is for ListValue. BUG=138946 TEST=N/A (no fix & no new feature) TBR=jar,zelidrag,scottbyer,mpcomplete,darin,achuith,sky,estade,atwilson,grt,thakis,jamesr,hans,sadrul,pastarmovj Review URL: https://chromiumcodereview.appspot.com/10837044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149819 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add support for performing a GetKey on startup.zea@chromium.org2012-07-311-19/+30
| | | | | | | | | | | | | | | | | The functionality is behind the --sync-keystore-encryption flag, and the key is not currently consumed by anything, but this lays the groundwork for testing the server and client interaction. We request a key anytime we perform a GetUpdates while the cryptographer does not have a keystore key. But, it is considered an error to request a key and not receive one, putting us into a state of backoff. BUG=129665 TEST=sync_unit_tests, running against python server Review URL: https://chromiumcodereview.appspot.com/10455012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149248 0039d316-1c4b-4281-b951-d872f2087c98
* Correct const accessors in base/values.(h|cc)vabr@chromium.org2012-07-271-1/+1
| | | | | | | | | | | | | For problem description and other info please see the BUG page. This is for DictionaryValue. BUG=138946 TEST=N/A (no fix & no new feature) TBR=jar scottbyer achuith agl mnissler davemoore garykac akalin hans bulach phajdan.jr jamesr Review URL: https://chromiumcodereview.appspot.com/10834004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148833 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Remove unneeded 'using syncer::' lines and 'syncer::' scopingsakalin@chromium.org2012-07-202-3/+3
| | | | | | | | | | | | | | | | | Since (almost) everything in sync/ is now in the 'syncer' namespace, all of these are redundant. Clean up indentation. Put sync_{client,listen_notifications} into syncer namespace. BUG=128060 TEST= Review URL: https://chromiumcodereview.appspot.com/10795018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147675 0039d316-1c4b-4281-b951-d872f2087c98
* Remove #pragma once from syncajwong@chromium.org2012-07-113-3/+0
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10700154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146074 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move ModelType and related classes to 'syncer' namespaceakalin@chromium.org2012-07-032-3/+3
| | | | | | | | | | | | | | Previously they were in 'syncer::syncable'. Also remove aliases to those classes from 'syncable'. BUG=128060 TEST= TBR=pkasting@chromium.org,jhawkins@chromium.org, Review URL: https://chromiumcodereview.appspot.com/10696087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145399 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move model_type* from syncable/ to base/akalin@chromium.org2012-07-033-3/+3
| | | | | | | | | | | | | | | | | | | Also move enum_set* to base/. This is the first step in moving ModelType et al. to the syncer namespace (from syncer::syncable). Move PurgeStalePayload() back to sync_session.cc. Move ModelTypePayloadMapFromRoutingInfo() to model_safe_worker.* and rename it to ModelSafeRoutingInfoToPayloadMap(). BUG=128060 TEST= Review URL: https://chromiumcodereview.appspot.com/10690071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145236 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Rename csync namespace to syncerakalin@chromium.org2012-06-288-16/+16
| | | | | | | | | | | | | | | Everyone was confused by 'csync'. 'syncer' seems more understandable. (Note that we can't use the 'sync' namespace since sync() is a function from unistd.h.) BUG=10662035 TEST= TBR=jhawkins@chromium.org,pkasting@chromium.org Review URL: https://chromiumcodereview.appspot.com/10698014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144820 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Refactor session tracking rlarocque@chromium.org2012-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | This change refactors the related structs ErrorCounters, SyncerStatus, and SyncCycleControlParameters. Their values have all been merged into AllModelTypeState, which has been renamed to ModelNeutralState. All the functions which depend on this data have been updated to use the new struct. This change also removes the DirtyOnWrite template class, the is_dirty flag, and the SyncerCommand logic to send change events if it detects a change in the syncer's status. The changes are so frequent and predictable that it's easier to just send the snapshots manually after any major syncer steps. Finally, this change removes the 'invalid_store' status member, which was never set nor read outside of unit tests. BUG=132630 TEST= Review URL: https://chromiumcodereview.appspot.com/10636010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143675 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Rename browser_sync to csync in sync/akalin@chromium.org2012-06-218-15/+15
| | | | | | | | | | | | | | | Update all references from chrome. Leave possibly-extraneous csync:: qualifications in sync/ for now. (This will be cleaned up once everything in sync/ is in csync::.) BUG=128060 TEST= TBR=jhawkins@chromium.org Review URL: https://chromiumcodereview.appspot.com/10600002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143449 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Remove ClearUserData command.tim@chromium.org2012-06-204-14/+14
| | | | | | | | | BUG=131336 TEST=none Review URL: https://chromiumcodereview.appspot.com/10584019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143088 0039d316-1c4b-4281-b951-d872f2087c98
* sync: create internal_api/public to house sync/ files needed by ↵tim@chromium.org2012-06-073-3/+3
| | | | | | | | | | | | | | | | | chrome/browser/sync. Note on sync.gyp changes and .cc file moves: most files in /public have .h and their .cc side by side, as they are simple implementations. In some cases like model_type.cc (and others in a follow up patch, like sync_manager.cc) have only their header exposed in /public while the impl stays behind, because it needs to include things from within sync/, and /public has a strict include DEPS policy. This is in accordance with other /public folders (like content/). Cleans up DEPS files in sync + c/b/sync. Adds sync/{engine, sessions, syncable} to public/. There is more to come (moving things in internal_api/ into public). Not touching /notifier as that is in flux at the moment. BUG=131130 TEST= Review URL: https://chromiumcodereview.appspot.com/10532019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141038 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Cleanup all tab sync enabling logic now that its on by default.zea@chromium.org2012-05-302-2/+2
| | | | | | | | | | BUG=none TEST= Review URL: https://chromiumcodereview.appspot.com/10443046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139462 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Replace TalkMediator*/MediatorThread* with PushClientakalin@chromium.org2012-05-171-23/+0
| | | | | | | | | | | | | | | Streamline methods of PushClient and its Observer subclass. Remove sync/protocol/service_constants.h and consolidate use of each constant in one place. Remove duplicate constant in cloud print code. BUG=76764 TEST= TBR=estade@chromium.org Review URL: https://chromiumcodereview.appspot.com/10398051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137615 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move PageTransitions enums to SyncEnumszea@chromium.org2012-05-165-50/+54
| | | | | | | | | | BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10382183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137309 0039d316-1c4b-4281-b951-d872f2087c98
* These bits were supposed to be included in 135775 but I forgot to save them :(pkasting@chromium.org2012-05-081-1/+2
| | | | | | | BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135867 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the "autogenerate keyword" bit on TemplateURL.pkasting@chromium.org2012-05-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a large change because a number of other significant pieces were either inherently tied to the above change, or too difficult to separate from it: * Because autogeneration was really only ever supposed to be used for the prepopulated Google entry, replace it with a system that auto-regenerates keywords for TemplateURLs that (a) use {google:baseURL} and (b) have a keyword that's currently "google.<TLD>" whenever the base URL changes. This means that users who manually create such TemplateURLs will automatically get the benefit of "autogenerated" keywords. * Pass information to the KeywordTable as bare TemplateURLData objects instead of TemplateURLs, now that the latter are not needed to perform keyword generation. * Remove the "autogenerate_keyword" column from the KeywordTable. This also takes the opportunity to remove the already-dead "logo_id" column (which I previously asked msw to leave in in order to only have to write the migration code once). This in turn requires adding version numbers to a lot of functions so they know which column set to use, as well as writing migration code to manually generate keywords for previously-autogenerated entries. * Migrate the "autogenerate_keyword" bit in data from prefs and sync as well. For sync this requires a variety of followon changes to send back ACTION_UPDATEs for migrated TemplateURLs and coalesce multiple SyncChanges to the same GUID. * Move various bits of TemplateURLService::GenerateKeyword() that were only used for the "autodetected on a webpage" case to the specific code for that case, in order to make GenerateKeyword() incapable of failing. This is important for the next item. * Remove the possibility for keywords to simply be empty. All TemplateURLs should now have a keyword, whether they were previously marked as "autogenerated" or not. While the UI already tried to guarantee this, the TemplateURL class itself and various pieces of TemplateURLService did not, or didn't deal correctly with exceptions. Enforcing this makes it much easier to reason about keywords and is important for the next item. * Guarantee that all keywords are unique, with one exception noted below. This allows callers to reliably refer to TemplateURLs by keyword; a future change will make AutocompleteMatch do precisely this. It also prevents weird edge cases in the UI and sync. * Exception: explicitly allow extension keywords to overlap with each other and with one non-extension TemplateURL. Previously, the behavior was somewhat random and buggy when we added and removed extensions that defined keywords, especially if we also tried to add/edit/remove keywords from the settings UI. We now define an explicit precedence order: non-replaceable TemplateURL > extension-provided TemplateURLs > replaceable TemplateURL; within the extensions section, the most recently-added extension wins. As we add and remove keywords, the current "TemplateURL for keyword" is always kept up-to-date according to this precedence order (so e.g. removing a later extension will "expose" an earlier one). BUG=none TEST=Adding extensions that specify omnibox keywords which conflict with local keywords should result in predictable behavior as described above; removing the extensions should restore the prior behavior. Review URL: https://chromiumcodereview.appspot.com/10381016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135775 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add support for automatic enabling of syncing tab favicons.zea@chromium.org2012-04-272-0/+4
| | | | | | | | | | | | | | | We add the sync_tab_favicons field to the nigori node and add support for automatically enabling the feature when we receive a new nigori node. Once we do enable the feature, the browser will only start writing favicons after the next restart. BUG=92728 TEST=using python testserver to enable sync tab favicons, then restarting. Review URL: http://codereview.chromium.org/10235013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134184 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add per-navigation timestamps/unique ids to tab sync.zea@chromium.org2012-04-252-2/+8
| | | | | | | | | | | | | | | | | | | | | | | A navigation's timestamps are updated only if the navigation is new or if the user recently moved back/foward to the navigation entry. Otherwise, we preserve old timestamps. To do this, we switch to using SyncedTabNavigations, which also contains the unique id of the navigation (pulled from NavigationEntry) and the timestamp of the navgation, and SyncedSessionTab (which we have to use in order to support SyncedTabNavigations). Lastly, the protos have been updated to include unique_id/timestamp per navigation, remove some obsolete fields that were unimportant, and add comments about what transitions mean and when they're set. BUG=98892 TEST=unit_tests, manually inspecting timestamps in sync node browser. Review URL: http://codereview.chromium.org/10125002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133942 0039d316-1c4b-4281-b951-d872f2087c98
* Augment the client debug info with the cause for nudges.lipalani@chromium.org2012-04-181-0/+8
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/9956038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132713 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add support for syncing tab favicons.zea@chromium.org2012-04-134-0/+31
| | | | | | | | | | | | | | | | This functionality is currently behind a flag. We only support writing a new favicon when the tab's current url changes. This avoids possible issues due to website-controlled favicons. On the receiving end, we use the historydb's AddPageNoVisitForBookmark functionality to locally load the favicon without needing history visits. BUG=92728 TEST=manual inspection with --sync-tab-favicons Review URL: http://codereview.chromium.org/9924028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132139 0039d316-1c4b-4281-b951-d872f2087c98