summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/glue
Commit message (Collapse)AuthorAgeFilesLines
* Merge 228586 "[Sync] Fix crash when all visits are from the future"zea@chromium.org2013-10-212-4/+61
| | | | | | | | | | | | | | | | | | | > [Sync] Fix crash when all visits are from the future > > It's possible for all favicons to have last visit times in the future. In that > case, adding a local favicon will result in its immediate expiration. > Previously this would crash. Now this will just result in a silent expiration > and no sync interaction. > > BUG=306150 > > Review URL: https://codereview.chromium.org/27246002 TBR=zea@chromium.org Review URL: https://codereview.chromium.org/32683005 git-svn-id: svn://svn.chromium.org/chrome/branches/1650/src@229843 0039d316-1c4b-4281-b951-d872f2087c98
* Merge 218097 "Merge 191028 "[Sync] Disable unrecoverable error u..."laforge@chromium.org2013-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | > Merge 191028 "[Sync] Disable unrecoverable error uploading." > > > [Sync] Disable unrecoverable error uploading. > > > > Disabling for 30 branch. > > > > BUG=235583 > > TBR=rlarocque@chromium.org > > > > Review URL: https://codereview.chromium.org/12770030 > > TBR=zea@chromium.org > > Review URL: https://codereview.chromium.org/22867019 TBR=zea@chromium.org Review URL: https://codereview.chromium.org/25741002 git-svn-id: svn://svn.chromium.org/chrome/branches/1650/src@226463 0039d316-1c4b-4281-b951-d872f2087c98
* * Fixed out-of-bounds crash bug in foreign_session_helper.cc.apiccion@chromium.org2013-09-231-0/+1
| | | | | | | | | | | | | * Now skips windows if all their tabs are empty. * Now skips sessions if all their windows are empty. * Method to query if foreign session are collapsed or expanded. * Returns Java timestamps (previously returned Windows timestamps) BUG=247382 Review URL: https://chromiumcodereview.appspot.com/23514039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224787 0039d316-1c4b-4281-b951-d872f2087c98
* Release password store synchronously on UI thread when shtudown starts.haitaol@chromium.org2013-09-204-21/+31
| | | | | | | | | BUG=274705 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/24210004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224525 0039d316-1c4b-4281-b951-d872f2087c98
* Send configuration stats together at the end of data type configuration so thathaitaol@chromium.org2013-09-202-13/+20
| | | | | | | | | | the stats will appear in one GWS log to make it easy to analyze. BUG=236466 Review URL: https://chromiumcodereview.appspot.com/23866012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224246 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Gracefully handle early shutdownrlarocque@chromium.org2013-09-192-58/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new object to communicate cross-thread cancellation signals. This new object, the CancellationSignal, is protected by a lock. It allows the receiving thread to query whether or not a stop has been requested. It also allows the receiving thread to safely register a cross-thread callback to be invoked immediately when a stop is requested. We use two instances of this class to ensure we meet all the requirements for a safe and fast sync backend shutdown. The first instance is used with the HttpBridgeFactory to allow the UI thread to force it to drop all refereces to its RequestContextGetter immediately. This is an important part of our plan to ensure that all references to that object are released before ProfileSyncService::Shutdown() returns, which is necessary to avoid racy crashes at shutdown. (See crbug.com/236451) The second instance is used with the ServerConnectionManager and the Syncer. Once signalled, it ensures that any active connections are released (possibly decrementing another ref to the RequestContextGetter), that any blocking I/O is aborted, and that no more connections will be instantiated. It's important to prevent the creation of more connections because the HttpBridgeFactory might trigger a crash if we asked it to create another connection after it had been shut down. The syncer's interaction with the second cancelation signal is more passive. It does not execute any callbacks when the signal is sent. Instead, it queries the signal as it performs sync cycles, and will cut short any existing sync cycle if it notices the signal has been sent. Finally, this CL includes one important change to the initialization of the HttpBridgeFactory. In order to properly register with the cancellation signal while still allowing the creation of the user agent to occur on the sync thread, its initialization had to be split into two parts. This class now has an Init() method in addition to its constructor. BUG=236451 Review URL: https://chromiumcodereview.appspot.com/23717047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224014 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing typoslipalani@chromium.org2013-09-181-3/+3
| | | | | | | | BUG=170375 Review URL: https://chromiumcodereview.appspot.com/23654030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223795 0039d316-1c4b-4281-b951-d872f2087c98
* Release password store on UI loop when worker is stopped so that passwordhaitaol@chromium.org2013-09-162-5/+26
| | | | | | | | | | service and thread can be shut down in proper order. BUG=274705 Review URL: https://chromiumcodereview.appspot.com/23463033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223427 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Add getters and setters to Entry classesrlarocque@chromium.org2013-09-133-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the Entry and MutableEntry classes' Get(X) and Put(X, V) members with GetX() and PutX(V) style members. There are many good reasons for performing this refactor. The main reason to implement it now is that we'd like to have more fine-grained control over the visibility of the getters and setters for certain fields, and it's really hard to implement that control when several different fields use the same accessor functions. Once this refactor is complete, we can modify the inheritance hierarchy for Entry and MutableEntry to introduce a new, semi-MutableEntry that provides only the setters whose changes are not "visible" to the underlying model. We can also build on this work to simplify the implementation of MutableEntry. The interface changes are the most notable part of this CL, but there are a few smaller changes here too, including: - Some small formatting cleanups. - In cases where Put() functions had signatures that returned bool but never returned anything other than 'true', those return values have been changed to void. - Some dead code in syncer_proto_util.cc has been removed. BUG=284672 Review URL: https://chromiumcodereview.appspot.com/23484035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223111 0039d316-1c4b-4281-b951-d872f2087c98
* bookmarks: Get rid of ui_test_utils.h entry from the exception list.tfarina@chromium.org2013-09-111-3/+3
| | | | | | | | | | | | | | In order to do this we move the WaitForBookmarkModelToLoad() function into a new helper file called bookmark_test_helpers.h. Eventually all the functions from bookmark_model_test_utils.h could be moved over there too. BUG=144783 TEST=unit_tests, browser_tests, interactive_ui_tests R=sky@chromium.org Review URL: https://codereview.chromium.org/23903027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222644 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 222154 "sync: Gracefully handle very early shutdown"vitalybuka@chromium.org2013-09-102-21/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes tests very Flaky. http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20Chromium&testType=sync_integration_tests&tests=TwoClientPasswordsSyncTest.SetPassphraseAndThenSetupSync Can reproduce on local build. > sync: Gracefully handle very early shutdown > > Introduce a new object to communicate cross-thread cancellation signals. > This new object, the CancellationSignal, is protected by a lock. It > allows the receiving thread to query whether or not a stop has been > requested. It also allows the receiving thread to safely register a > cross-thread callback to be invoked immediately when a stop is > requested. > > This class is used to reimplement the UI thread to sync thread early > shutdown signal. Previously, the UI thread would try to call in to > objects owned by the sync thread. This required a workaround if the > signal arrived very early, since we couldn't guarantee the sync thread > had actually created those objects until later. The CancellationSignal > is owned by the UI thread, so it is safe to call its RequestStop() at > any point during sync initialization. The sync thread will receive the > signal when it's ready. > > The new scheme has a few advantages over the old: > - Thread ownership is simpler. The SyncBackendHost::Core, SyncManager, > ServerConnectionManager, SyncScheduler and Syncer can now claim that > all their member functions run on the sync thread. > - We no longer need to implement special case logic for when a shutdown > is requested before the SyncManager has initialized. > - In a future CL, we can take advantage of the fact that we no longer > require the special case to reduce inter-thread communication during > sync startup. This will make startup simpler and, in some cases, > improve sync startup time by as much as a few hundred milliseconds. > - This will make it easier to address crbug.com/236451. > > BUG=236451 > > Review URL: https://chromiumcodereview.appspot.com/23189021 TBR=rlarocque@chromium.org Review URL: https://codereview.chromium.org/23658030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222205 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Gracefully handle very early shutdownrlarocque@chromium.org2013-09-102-38/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new object to communicate cross-thread cancellation signals. This new object, the CancellationSignal, is protected by a lock. It allows the receiving thread to query whether or not a stop has been requested. It also allows the receiving thread to safely register a cross-thread callback to be invoked immediately when a stop is requested. This class is used to reimplement the UI thread to sync thread early shutdown signal. Previously, the UI thread would try to call in to objects owned by the sync thread. This required a workaround if the signal arrived very early, since we couldn't guarantee the sync thread had actually created those objects until later. The CancellationSignal is owned by the UI thread, so it is safe to call its RequestStop() at any point during sync initialization. The sync thread will receive the signal when it's ready. The new scheme has a few advantages over the old: - Thread ownership is simpler. The SyncBackendHost::Core, SyncManager, ServerConnectionManager, SyncScheduler and Syncer can now claim that all their member functions run on the sync thread. - We no longer need to implement special case logic for when a shutdown is requested before the SyncManager has initialized. - In a future CL, we can take advantage of the fact that we no longer require the special case to reduce inter-thread communication during sync startup. This will make startup simpler and, in some cases, improve sync startup time by as much as a few hundred milliseconds. - This will make it easier to address crbug.com/236451. BUG=236451 Review URL: https://chromiumcodereview.appspot.com/23189021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222154 0039d316-1c4b-4281-b951-d872f2087c98
* Move PasswordForm from //content to //autofill.blundell@chromium.org2013-09-093-24/+24
| | | | | | | | | | | | | | The primary goal of this change is to allow PasswordForm to depend on // autofill code for password generation. A side benefit is that this change will allow iOS to cleanly use PasswordForm. To accommodate the fact that multiple message files need to know about PasswordForm, it is put into a newly-created autofill_param_traits_macros.h rather than autofill_messages.h. BUG=263121 Review URL: https://chromiumcodereview.appspot.com/23742004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221991 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Improve ModelAssociation event tracingrlarocque@chromium.org2013-09-071-5/+12
| | | | | | | | | | | | Take advantage of the ASYNC variants of the event tracing macros when tracing model association times. This makes the model association tracing much more reliable and easier to read. BUG=286541 Review URL: https://chromiumcodereview.appspot.com/23907005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221879 0039d316-1c4b-4281-b951-d872f2087c98
* This defers starting background extension page RenderViewsgspencer@chromium.org2013-09-063-3/+6
| | | | | | | | | | | | | | | | | | | until after session restore has completed. This is mainly to help login/startup times so that Chrome is useful to the user earlier. To make sure that this is actually helping, this CL includes a Finch experiment that will only enable the deferral on 50% of the clients. It is also expected that deferring these will help with some problems we've seen when extensions attempt to do GAIA authentication. BUG=279427,259791 TEST=Ran performance tests on ChromeOS and Linux Review URL: https://chromiumcodereview.appspot.com/23618014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221621 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Add GetAllSyncData to sync/apitim@chromium.org2013-09-0514-61/+97
| | | | | | | | | | | | | | | | | | | | This allows datatype SyncableServices to request a fresh copy of the data that was previously only passed over in batch form during MergeDataAndStartSyncing. Since it can be slow, it should be used sparingly. Though currently unused, Sessions will soon need this behavior to deal with cases where (e.g) the local session is deleted by a foreign client, thereby corrupting TabNodePool tracking and requiring a full re-association. TBR=zea@chromium.org ^Many function signature touchups under browser/ BUG=98892 Review URL: https://codereview.chromium.org/23129007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221540 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Remove ModelTypeInvalidationMaprlarocque@chromium.org2013-09-032-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Removes the definition and all uses of ModelTypeInvalidationMap. The ModelTypeInvalidationMap was useful only for sync-related invalidations. Its existence made sense when sync was the only client for invalidations. Now that we have many invalidations clients, it makes sense to replace it with the more generic ObjectIdInvalidationMap. The reason for doing this now is that the ObjectIdInvalidationMap will soon be modified to be incompatible with the current definition of ModelTypeInvalidationMap. In order to support trickles it will be modified to allow it to contain several invalidations per ObjectId. Although it would have been possible to maintain compatibility by making a corresponding modification to ModelTypeInvalidationMap, there's really no point in having two invalidation map types. In the long run, it makes more sense to deprecate ModelTypeInvalidationMap. BUG=233437 Review URL: https://chromiumcodereview.appspot.com/23238005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221025 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Don't journal/unapply types that are already disabledzea@chromium.org2013-08-281-1/+9
| | | | | | | | | | | | If a type has already been journaled/unapplied, we don't need to do it again. Just ignore those types in that case. BUG=270054 TEST=Enable full sync encryption. Disable a datatype. Sync should not DCHECK. Review URL: https://chromiumcodereview.appspot.com/23658003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220106 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation of the onDeviceInfoChange event.lipalani@chromium.org2013-08-282-1/+28
| | | | | | | | | | | | | | | | | | When the devices signed into the current account changes, this event is used to notify listeners. The listeners would also get the updated list of devices. Nicolas - Would you mind reviewing the Synced_device_tracker change? matt - rest of the changes. Note - the pieces missing from this CR(will be addressed in the following CR) 1. Rename signedin_devices to signed_in_devices. All the new code follow the latter convention. Old code has to be updated. 2. An extension to exercise this functionality end to end. BUG=170375 Review URL: https://chromiumcodereview.appspot.com/22926022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220065 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor TabBase to give it ownership of ContentViews and NativePages. This ↵dtrainor@chromium.org2013-08-281-1/+1
| | | | | | | | | | | | | | | | CL includes the following: - Moves ContentView/NativePage object ownership to TabBase. - TabBase now has the initialization/destruction methods associated with ContentViews and WebContents. - Creates a TabObserver to pipe out changes to TabBase to listeners. - Adds helper methods for creating delegates/observers on the WebContents/ContentView. BUG=277135 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/23020009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220051 0039d316-1c4b-4281-b951-d872f2087c98
* Add HTTP status code to navigation data structurespvalenzuela@chromium.org2013-08-281-0/+6
| | | | | | | | | | This is a reboot of https://codereview.chromium.org/11054025/ BUG=153936,260276 Review URL: https://chromiumcodereview.appspot.com/22837005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219954 0039d316-1c4b-4281-b951-d872f2087c98
* Add the missing GetWebContent() method.aurimas@chromium.org2013-08-262-0/+5
| | | | | | | | | | | | | Fix the broken Chrome for Android build that happened after https://chromiumcodereview.appspot.com/22981004 which added a new virtual function. BUG=265523 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/22842015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219573 0039d316-1c4b-4281-b951-d872f2087c98
* Add NavigationTimeKeeper to track network navigation times of navigation haitaol@chromium.org2013-08-253-1/+25
| | | | | | | | | | | | entries. History and session sync use NavigationTimeKeeper to obtain consistent network timestamps of navigations. TBR=ben@chromium.org BUG=265523 Review URL: https://chromiumcodereview.appspot.com/22981004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219484 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation of DeviceInfo API (get). The API is not yet exposed the dev ↵lipalani@chromium.org2013-08-201-14/+28
| | | | | | | | | | | | | | | | channel(the permission and manifest entries are missing) Nicolas - would you mind reviewing the device_info.cc and pss_mock changes. In DeviceInfo the changes are to make the tovalue method consistent with the API docs. However there still remains some work particularly for ios devices which are marked as todo and if you are OK with it we will do it as a seperate review. Matt - Please review the rest. BUG=170375 R=mpcomplete@chromium.org, zea@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=218087 Review URL: https://codereview.chromium.org/22706006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218374 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 218087 "Plumbing to expose DeviceInfo API (get) to dev ch..."yoz@chromium.org2013-08-161-28/+14
| | | | | | | | | | | | | | | | | | > Plumbing to expose DeviceInfo API (get) to dev channel. > > Nicolas - would you mind reviewing the device_info.cc and pss_mock changes. In DeviceInfo the changes are to make the tovalue method consistent with the API docs. However there still remains some work particularly for ios devices which are marked as todo and if you are OK with it we will do it as a seperate review. > > Matt - Please review the rest. > BUG=170375 > R=mpcomplete@chromium.org, zea@chromium.org > > Review URL: https://codereview.chromium.org/22706006 TBR=lipalani@chromium.org Review URL: https://codereview.chromium.org/22865018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218098 0039d316-1c4b-4281-b951-d872f2087c98
* Plumbing to expose DeviceInfo API (get) to dev channel.lipalani@chromium.org2013-08-161-14/+28
| | | | | | | | | | | | Nicolas - would you mind reviewing the device_info.cc and pss_mock changes. In DeviceInfo the changes are to make the tovalue method consistent with the API docs. However there still remains some work particularly for ios devices which are marked as todo and if you are OK with it we will do it as a seperate review. Matt - Please review the rest. BUG=170375 R=mpcomplete@chromium.org, zea@chromium.org Review URL: https://codereview.chromium.org/22706006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218087 0039d316-1c4b-4281-b951-d872f2087c98
* Rename extension_manifest_keys namespace to extensions::manifest_keys.yoz@chromium.org2013-08-151-2/+2
| | | | | | | | | | | | | Move it to extensions/common/manifest_constants.cc. Minorly improve packaged app + manifest version 1 error message. BUG=162530 TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/22794012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217709 0039d316-1c4b-4281-b951-d872f2087c98
* On session restore delete unassociated tab_ids.shashishekhar@chromium.org2013-08-086-62/+55
| | | | | | | | | | | | | Old tab nodes are now added to free node pool, they can have stale tab_id values from the old session. Instead of keeping old tab nodes with stale values simply delete them so that they do not accidentally conflict with tab_id of the restarted session. BUG=263999 TEST=Automated + Manual on Android. Review URL: https://chromiumcodereview.appspot.com/20244002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216464 0039d316-1c4b-4281-b951-d872f2087c98
* [Managed users] Associate tabs with only blocked navigations in ↵bauerb@chromium.org2013-08-073-57/+100
| | | | | | | | | | SessionModelAssociator. BUG=266465 Review URL: https://chromiumcodereview.appspot.com/21576002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216117 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid wasted work in ShouldSyncSessionTab().pochang0403@gmail.com2013-08-071-0/+1
| | | | | | | | BUG=268092 Review URL: https://chromiumcodereview.appspot.com/22072002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216079 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unnecessary #if defined(ENABLE_MANAGED_USERS) and header includes.bauerb@chromium.org2013-08-052-5/+0
| | | | | | | | | TBR=kalman@chromium.org,erg@chromium.org,tim@chromium.org,pkotwicz@chromium.org,sky@chromium.org BUG=none Review URL: https://chromiumcodereview.appspot.com/21523002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215605 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Convert TabNodePool to use tab_node_id as primary index.tim@chromium.org2013-08-029-143/+152
| | | | | | | | | | | | | | | | | | | The tab node id and sync id are similarly unique for purposes of TabNodePool, and having both is functionally redundant. Since the Sync API is designed to work with client tag based referencing and not IDs, and we want to convert sessions to use the sync API, this patch removes use of sync IDs as the primary lookup key in TabNodePool. chrome/android & chrome/browser/android OWNERS: TBR=yfriedman@chromium.org BUG=98892,80194 Review URL: https://chromiumcodereview.appspot.com/19529003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215208 0039d316-1c4b-4281-b951-d872f2087c98
* This reverts 214330 but adds https://codereview.chromium.org/21184002/, ↵tim@chromium.org2013-08-018-117/+295
| | | | | | | | | | | | | which is already approved. TBR=shashishekhar@chromium.org TBR=pkasting@chromium.org TBR=zea@chromium.org BUG=263999, 98892 Review URL: https://chromiumcodereview.appspot.com/20618006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214958 0039d316-1c4b-4281-b951-d872f2087c98
* Helper to do mapping between sync guid and public device id.lipalani@chromium.org2013-07-312-2/+13
| | | | | | | | | BUG=170375 R=mpcomplete@chromium.org, zea@chromium.org Review URL: https://codereview.chromium.org/20171002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214786 0039d316-1c4b-4281-b951-d872f2087c98
* Lock-free shutdown of profile sync service. Changes include:haitaol@chromium.org2013-07-3134-1170/+987
| | | | | | | | | | | | | | | | | | | | | | * 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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210955 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=213642 Review URL: https://chromiumcodereview.appspot.com/16770005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214500 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 213872 "Revert 213589 to reland 213396, which re-lands 21..."hashimoto@chromium.org2013-07-308-290/+113
| | | | | | | | | | | | | | | | | | | | | Causing DCHECK failure [26974:26974:0730/185024:FATAL:synced_session_tracker.cc(297)] Check failed: TabNodePool::kInvalidTabNodeID != tab_node_id (-1 vs. -1) > Revert 213589 to reland 213396, which re-lands 212635 - Track tab node IDs in SyncedSessionTracker. > > Only difference to 213396 is that this also includes: https://codereview.chromium.org/20239002, removing a DCHECK from original cl that landed as 212635. > > TBR=pkasting@chromium.org > > BUG=98892, 80194, 263999 > > Review URL: https://chromiumcodereview.appspot.com/20529002 TBR=tim@chromium.org Review URL: https://codereview.chromium.org/21231002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214330 0039d316-1c4b-4281-b951-d872f2087c98
* Get DeviceInfo from session tag.lipalani@chromium.org2013-07-262-1/+31
| | | | | | | | | BUG= R=zea@chromium.org Review URL: https://codereview.chromium.org/19654005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213984 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 213589 to reland 213396, which re-lands 212635 - Track tab node IDs ↵tim@chromium.org2013-07-268-113/+290
| | | | | | | | | | | | | | in SyncedSessionTracker. Only difference to 213396 is that this also includes: https://codereview.chromium.org/20239002, removing a DCHECK from original cl that landed as 212635. TBR=pkasting@chromium.org BUG=98892, 80194, 263999 Review URL: https://chromiumcodereview.appspot.com/20529002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213872 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 213642 "Lock-free shutdown of profile sync service. Chang..."earthdok@chromium.org2013-07-2534-985/+1170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reverting due to memory leaks. BUG=264325 > 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 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210333 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210955 > > Review URL: https://chromiumcodereview.appspot.com/16770005 TBR=haitaol@chromium.org Review URL: https://codereview.chromium.org/20374005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213671 0039d316-1c4b-4281-b951-d872f2087c98
* Lock-free shutdown of profile sync service. Changes include:haitaol@chromium.org2013-07-2534-1170/+985
| | | | | | | | | | | | | | | | | | | | * 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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210955 Review URL: https://chromiumcodereview.appspot.com/16770005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213642 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 213396 "Revert "Revert 212635 "sync: Track tab node IDs i..."hashimoto@chromium.org2013-07-258-273/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | Hitting the same DCHECK mentioned in crrev.com/212879, on Linux build and Chrome OS build (GYP_DEFINES="chromeos=1") running on Linux, especially when quickly and randomly opening and closing tabs and windows. > Revert "Revert 212635 "sync: Track tab node IDs in SyncedSessionTracker."" > > This time with less DCHECK. Previous versions of TabNodePool permitted > tab_node_id values of 0, so this patch relaxes the DCHECK to account > for that by using "-1" as the invalid ID value and changing the type > of the id from size_t to int. > > For browser/ui/OWNERS stamp: > > TBR=pkasting@chromium.org > > BUG=80194,98892 > > Review URL: https://chromiumcodereview.appspot.com/19954008 TBR=tim@chromium.org Review URL: https://codereview.chromium.org/20215003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213589 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert 212635 "sync: Track tab node IDs in SyncedSessionTracker.""tim@chromium.org2013-07-248-113/+273
| | | | | | | | | | | | | | | | | This time with less DCHECK. Previous versions of TabNodePool permitted tab_node_id values of 0, so this patch relaxes the DCHECK to account for that by using "-1" as the invalid ID value and changing the type of the id from size_t to int. For browser/ui/OWNERS stamp: TBR=pkasting@chromium.org BUG=80194,98892 Review URL: https://chromiumcodereview.appspot.com/19954008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213396 0039d316-1c4b-4281-b951-d872f2087c98
* Correctly integrate StoragePartition into TestingProfile.ajwong@chromium.org2013-07-233-31/+26
| | | | | | | | | | | | | | | | | | | | | | | Until this CL, TestingProfile had 3 distinct URLRequestContexts it would return to the user: one via profile->GetDefaultStoragePartition()->GetRequestContext(), one via profile->GetRequestContext(), and one via profile->GetResourceContext->GetRequestContext(). All of these had different cookie stores. This CL unified them so they all return the one from profile->GetDefaultStoragePartition()->GetRequestContext(). This correctly mimics how production code works. Doing this had a bunch of implications: (1) Removes TestingProfile::CreateRequestContext()/ResetRequestContext() (2) Changes MockRequestContext to share the URLRequestContext with TestingProfile. (3) TestingProfile now requires all BrowserThreads. Point (3) effectively adds TestBrowserThreadBundle into a bunch more spots. Because of that, we also have the following changes: (a) AshTestBase now has a TestBrowserThreadBundle (b) Removed a bunch of real threads from tests. (c) TemplateUrlService has reworked synchronization semantics. (d) Removed MultiThreadTestHelper. (e) Added TestingIOThread class + testing API in IOThread to mock out various IO thread tasks which enervated with the new TestBrowserThreadBundle. TBR=bauerb,brettw,isherman,joth,jyasskin,mattm,mmenke,mnissler,pkasting,rkc,rlp,satorux,tim,xians,joth BUG=159193 Review URL: https://chromiumcodereview.appspot.com/17127002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213272 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused unit testsrlarocque@chromium.org2013-07-232-284/+0
| | | | | | | | | | | | These should have been deleted in r208347. I'm guessing that a bad rebase accidentally undeleted them. They're not in any gyp files, so they don't actually get compiled or run. BUG=124137 Review URL: https://chromiumcodereview.appspot.com/19976004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213026 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug caught by clang's -Wlogical-not-parenthesesthakis@chromium.org2013-07-221-3/+2
| | | | | | | | | | | | | ../../chrome/browser/sync/glue/data_type_manager_impl.cc:447:10: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses] DCHECK(!result.status == OK || ^ ~~ BUG=262248 R=zea@chromium.org Review URL: https://codereview.chromium.org/19734007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212905 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 212635 "sync: Track tab node IDs in SyncedSessionTracker."xians@chromium.org2013-07-227-259/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL leads a DCHECK in FATAL:synced_session_tracker.cc(297)] Check failed: TabNodePool::kInvalidTabNodeID != tab_node_id > sync: Track tab node IDs in SyncedSessionTracker. > > In order to build session sync atop Sync API, we'll need to track tab node > ids for tabs foreign sessions, primarily so we know which nodes to delete when > a foreign session becomes stale. This patch adds tab_node_id to > SessionTabWrapper for this purpose. > > In addition, some minor cleanup such as using a named enum parameter to the > Wrapper classes to denote ownership intent more clearly, and rewords some > comments and variables in SessionModelAssociator / SyncedSessionTracker to > improve readability and make it easier (hopefully :) ) to port to sync API. > > BUG=98892, 80194 > R=shashishekhar@chromium.org, zea@chromium.org > > Review URL: https://codereview.chromium.org/19196003 TBR=tim@chromium.org Review URL: https://codereview.chromium.org/19680007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212879 0039d316-1c4b-4281-b951-d872f2087c98
* De-couple shutting down sync backend from deleting sync data.yfriedman@chromium.org2013-07-202-3/+13
| | | | | | | | | | | | This is used on Android to avoid deleting sync data and having to redowload for short term disabling of sync. It's a necessary follow-on from https://chromiumcodereview.appspot.com/17699005 which coupled invalidator shutdown with sync shutdown. BUG=257111 Review URL: https://chromiumcodereview.appspot.com/19474002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212777 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Add pre-commit update avoidance mode + flagrlarocque@chromium.org2013-07-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* sync: Track tab node IDs in SyncedSessionTracker.tim@chromium.org2013-07-197-97/+259
| | | | | | | | | | | | | | | | | | | In order to build session sync atop Sync API, we'll need to track tab node ids for tabs foreign sessions, primarily so we know which nodes to delete when a foreign session becomes stale. This patch adds tab_node_id to SessionTabWrapper for this purpose. In addition, some minor cleanup such as using a named enum parameter to the Wrapper classes to denote ownership intent more clearly, and rewords some comments and variables in SessionModelAssociator / SyncedSessionTracker to improve readability and make it easier (hopefully :) ) to port to sync API. BUG=98892, 80194 R=shashishekhar@chromium.org, zea@chromium.org Review URL: https://codereview.chromium.org/19196003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212635 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce ToValue method in device info.lipalani@chromium.org2013-07-182-0/+53
| | | | | | | | | | | | The ToValue method does not expose the the cache guid for the device instead it exposes a privacy safe public id. The CL also includes a setter to set the public_id. BUG= R=zea@chromium.org Review URL: https://codereview.chromium.org/19272004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212421 0039d316-1c4b-4281-b951-d872f2087c98