summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions
Commit message (Collapse)AuthorAgeFilesLines
* Merge 32240 - Ensure that the refcount on InternalGetCommandRequest stays ↵jamesr@chromium.org2009-11-181-1/+1
| | | | | | | | | | | | | | | | | | nonzero through a PostTask The problem was that BaseSessionService::ScheduleGetLastSessionCommands() was posting a task with a InternalGetCommandsRequest* request parameter by calling NewRunnableMethod(.., &SessionBackend::ReadLastSessionCommands, request). SessnionBackend::ReadLastSessionCommands takes one parameter of type scoped_refptr<InternalGetCommandsRequest>. However, NewRunnableMethod was matching the template because an InternalGetCommandsRequest* is implicitly convertable to a scoped_refptr<InternalGetCommandsRequest> but it was not actually creating the scoped_refptr<> (and thus bumping the refcount) until the task was dispatched. By this time the refcount on the InternalGetCommandsRequest had already dropped to zero, leading to memory corruption. This fixes the problem by passing a scoped_refptr<...> in to NewRunnableMethod() to ensure that it is copied and that the refcount stays up. TEST=covered by TabRestoreUITest.RestoreIntoSameWindow caused very intermittend failures locally BUG=27191 Review URL: http://codereview.chromium.org/404012 TBR=jamesr@chromium.org Review URL: http://codereview.chromium.org/408005 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@32355 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes almost all of the rest of lint errors in the chrome/ directory (minus ↵erg@google.com2009-11-132-4/+4
| | | | | | | | the really hard ones which will need actual review instead of rubber-stamping.) Review URL: http://codereview.chromium.org/386026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31932 0039d316-1c4b-4281-b951-d872f2087c98
* A little cleanup in SessionRestoreUITest.phajdan.jr@chromium.org2009-11-121-15/+3
| | | | | | | | | | | | | - don't reload tabs to ensure that a page loaded (it's handled in waiting for completion of IDC_NEW_TAB) - simplify the code, making it shorter and issuing less automation calls TEST=none BUG=none Review URL: http://codereview.chromium.org/385066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31800 0039d316-1c4b-4281-b951-d872f2087c98
* Ninth patch in making destructors of refcounted objects private.jam@chromium.org2009-11-075-7/+17
| | | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/372013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31357 0039d316-1c4b-4281-b951-d872f2087c98
* Use GetSwitchValueASCII.tony@chromium.org2009-11-061-3/+3
| | | | | | | | | | | | BUG=24672 TEST=None Original patch by Thiago Farina <thiago.farina@gmail.com> at http://codereview.chromium.org/296004 Review URL: http://codereview.chromium.org/373013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31269 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: don't restore explicitly closed windows.viettrungluu@chromium.org2009-11-052-2/+15
| | | | | | | | | | | | | With "On startup"/"Restore the pages that were open last" set (in Preferences), a window which was explicitly closed (using the red button, Cmd-Shift-W, the menu item -- but not due to quit) should not be restored on startup. This is the behaviour of Firefox and Camino (Safari doesn't appear to implement this feature). Note about this patch: Depending on how we decide things will work for App mode, much more code could be disabled on Mac. BUG=13341 TEST=Set the browser to restore pages on start (see above). Navigate somewhere interesting; close window; quit; restart; should open a browser with default window (NTP or homepage or whatever). Navigate somewhere; quit; restart; should open previously opened stuff. Make sure that session restore (also crash recovery) still work as expected. Review URL: http://codereview.chromium.org/362016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31164 0039d316-1c4b-4281-b951-d872f2087c98
* Clicking on restore window button on ntp now nukes ntp. We always didsky@chromium.org2009-11-051-0/+6
| | | | | | | | | | | this for tabs, just not windows. BUG=21316 TEST=see bug Review URL: http://codereview.chromium.org/360060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31146 0039d316-1c4b-4281-b951-d872f2087c98
* Make SessionService use its own enum for storing window type in the session ↵ben@chromium.org2009-11-052-5/+55
| | | | | | | | | | | database. This allows us to modify Browser::Type without invalidating databases from older versions. http://crbug.com/26500 TEST=see bug Review URL: http://codereview.chromium.org/361016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31069 0039d316-1c4b-4281-b951-d872f2087c98
* Changes session restore to use a normal load rather than preferringsky@chromium.org2009-11-033-7/+22
| | | | | | | | | | | | the cache. We need to do this else we don't honor page expiration and end up showing stale data for some sites. BUG=21195 TEST=make sure session restore works. Review URL: http://codereview.chromium.org/341043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30892 0039d316-1c4b-4281-b951-d872f2087c98
* Fix window restore behaviour on Mac.erg@chromium.org2009-10-291-1/+12
| | | | | | | | | | | | | | | | On the mac, there can be no windows, but the application is sitll open. This confused "Restore the pages that were open last" so that it would restore when opening a new window. BUG=13341 TEST=Open chromium. Set On Startup to "Restore the pages that were open last". Open a few tabs. Close the window (but not chromium). Click the dock icon. The tabs shouldn't be restored. But if you quit chrome and start again, things should reopen. Review URL: http://codereview.chromium.org/340023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30463 0039d316-1c4b-4281-b951-d872f2087c98
* Changes ui proxy classes to use Browser::Types rather than copyingsky@chromium.org2009-10-281-7/+7
| | | | | | | | | | them. BUG=none TEST=none Review URL: http://codereview.chromium.org/343018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30355 0039d316-1c4b-4281-b951-d872f2087c98
* Take 2 at this. The only change between this and the first is to add the ↵sky@chromium.org2009-10-274-23/+130
| | | | | | | | | | | | | | | GetType message to the end of the list and to keep the old message for creating a new browser as well as adding one that takes the type. To change the params of the message requires updating the reference build. That's best done on a weekend when I'm bored. Makes session restore on Chrome OS restore popups. BUG=18862 TEST=none Review URL: http://codereview.chromium.org/329040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30255 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 30194 - Makes session restore on Chrome OS restore popups.sky@chromium.org2009-10-274-130/+23
| | | | | | | | | | | | BUG=18862 TEST=none Review URL: http://codereview.chromium.org/337030 TBR=sky@chromium.org Review URL: http://codereview.chromium.org/335047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30204 0039d316-1c4b-4281-b951-d872f2087c98
* Makes session restore on Chrome OS restore popups.sky@chromium.org2009-10-274-23/+130
| | | | | | | | | BUG=18862 TEST=none Review URL: http://codereview.chromium.org/337030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30194 0039d316-1c4b-4281-b951-d872f2087c98
* More style nits.erg@google.com2009-10-141-2/+2
| | | | | | | | (Working on cleaning chrome/ so hopefully we can lint it by default.) Review URL: http://codereview.chromium.org/274040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28971 0039d316-1c4b-4281-b951-d872f2087c98
* valgrind: memset the window command data structure. |timestamp| is aligned ↵jhawkins@chromium.org2009-09-161-2/+8
| | | | | | | | | | on a 16 byte boundary leaving 4 bytes of uninitialized data in the middle of the struct. We write this data to disk, which is a possible security risk. BUG=22031 TEST=TabRestoreUITest.RestoreToDifferentWindow Review URL: http://codereview.chromium.org/196144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26379 0039d316-1c4b-4281-b951-d872f2087c98
* Fix two tests that leak temporary files.thestig@chromium.org2009-09-021-12/+4
| | | | | | | | BUG=none TEST=Run ExtensionsServiceTest and SessionBackendTest, make sure they don't leave extra temp files behind. Review URL: http://codereview.chromium.org/180068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25149 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-281-4/+1
| | | | | | | | | | | This reverts commit r24792. TBR=estade Review URL: http://codereview.chromium.org/179028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a ton of compiler warnings.estade@chromium.org2009-08-281-1/+4
| | | | | | | | | | | | | | | Most of these are classes with virtual methods lacking virtual destructors or NULL used in non-pointer context. BUG=none TEST=app_unittests && base_unittests --gtest_filter=-ConditionVariableTest.LargeFastTaskTest patch by Jacob Mandelson <jlmjlm [at] gmail> http://codereview.chromium.org/171028/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24792 0039d316-1c4b-4281-b951-d872f2087c98
* Split short-circuited assertions in session_restore_uitest.cc to make morephajdan.jr@chromium.org2009-08-141-19/+20
| | | | | | | | | | | | | meaningful errors appear in the logs. This will help fight the test flakiness. TEST=none BUG=none Review URL: http://codereview.chromium.org/164564 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23482 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r23357 since it doesn't seem to be the cause of unit testtony@chromium.org2009-08-132-4/+4
| | | | | | | | | | | | | | | | | failure: Renames the NavigationEntry::display_url() to virtual_url(). BUG=6970 (http://crbug.com/6970) TEST=None Patch by Thiago Farina <thiago.farina@gmail.com> at http://codereview.chromium.org/164383 Review URL: http://codereview.chromium.org/165501 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23374 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Renames the NavigationEntry::display_url() to virtual_url()."tony@chromium.org2009-08-132-4/+4
| | | | | | | | | This reverts commit r23357. Review URL: http://codereview.chromium.org/164517 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23367 0039d316-1c4b-4281-b951-d872f2087c98
* Renames the NavigationEntry::display_url() to virtual_url().tony@chromium.org2009-08-132-4/+4
| | | | | | | | | | | | | BUG=6970 (http://crbug.com/6970) TEST=None Patch by Thiago Farina <thiago.farina@gmail.com> at http://codereview.chromium.org/164383 Review URL: http://codereview.chromium.org/165485 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23357 0039d316-1c4b-4281-b951-d872f2087c98
* Changes SessionService to make sure a Pickle is deleted before thesky@chromium.org2009-08-101-5/+10
| | | | | | | | | | | | | | memory the pickle was created from is deleted. I don't think the current code actually causes a problem as Pickle's destructor won't attempt to delete the memory in this case, but I'm adding this to make it clear the Pickle should be deleted and prevent any future problems. BUG=none TEST=none Review URL: http://codereview.chromium.org/165241 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22921 0039d316-1c4b-4281-b951-d872f2087c98
* Landing Thiago Farina's CL.jcampan@chromium.org2009-07-291-1/+1
| | | | | | | | | | | | | See http://codereview.chromium.org/159186 Renaming GetNormalBounds to GetRestoredBounds from browser_window.h. BUG=None TEST=None TBR=tfarina Review URL: http://codereview.chromium.org/160337 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21983 0039d316-1c4b-4281-b951-d872f2087c98
* Adds timestamp to session restore for tabs and windows.arv@google.com2009-07-203-23/+173
| | | | | | | | | | BUG=13134 TEST=None Review URL: http://codereview.chromium.org/155609 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21095 0039d316-1c4b-4281-b951-d872f2087c98
* Makes --pinned-tab-count work if session restore is enabled, but wesky@chromium.org2009-07-171-3/+26
| | | | | | | | | | | don't restore anything. BUG=none TEST=none Review URL: http://codereview.chromium.org/155667 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20935 0039d316-1c4b-4281-b951-d872f2087c98
* Wires up restoring pinned tabs for session and tab restoresky@chromium.org2009-07-148-22/+245
| | | | | | | | | | | services. And turns on pinned tabs by default on linux. BUG=16634 TEST=Currently this linux only. Try tab pinning and make sure it works. Review URL: http://codereview.chromium.org/149621 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20650 0039d316-1c4b-4281-b951-d872f2087c98
* Sprinkle some defensiveness into the UI tests so that they don't explode if ↵stuartmorgan@chromium.org2009-07-071-4/+9
| | | | | | | | | | the proxy doesn't respond (e.g., due to a timeout). BUG=none TEST=Hopefully the Mac valgrind bots will more reliably run all their tests (although there are likely more issues like this lurking). Review URL: http://codereview.chromium.org/149281 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20096 0039d316-1c4b-4281-b951-d872f2087c98
* Do some refactoring of renderer_host.brettw@chromium.org2009-07-061-1/+1
| | | | | | | | | | | | | | | | | | | This removes the last dependency on tab_contents from the renderer_host code and into the RenderViewHostDelegate. Some of the tests depended on tab_contents, so I moved to a new directory with the tab_contents include allowed via DEPS. Now DEPS can enforce that no additional tab_contents includes are added to renderer_host. RenderViewHost delegate is now pure virtual. After spending a while *again* figuring out why my code didn't work, only to find it was because the default implementation of a function was getting called instead of the real one, I decided to make this pure virtual. It is implemented by TabContents, which implements basically everything, and two other places that implement less. Only two lists of duplicate functions seems not too bad, although long-term it would be nice if this delegate was somehow more succinct. Review URL: http://codereview.chromium.org/155071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19982 0039d316-1c4b-4281-b951-d872f2087c98
* Implement restoring closed tab menu item. Reworked cross-platform code to ↵pinkerton@chromium.org2009-06-193-67/+52
| | | | | | | | | | handle the case of restoring when there are no browsers open by making window restore re-use a given browser if it has no tabs. Removed unit test that assumes it can pass a NULL Browser. Wrote a new UI test to cover the same area, but it's disabled until another bug is fixed, and I didn't want to hold up landing this feature. Added key shortcut for "open window in incognito mode". BUG=13758 TEST=restoring closed tabs with visible windows and with no windows remaining open. Review URL: http://codereview.chromium.org/125257 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18806 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in browser/phajdan.jr@chromium.org2009-06-132-0/+2
| | | | | | | | | | | | - remove unneeded header includes - move implementation bits out of headers - more explicit header deps In my scan of headers I got up to (including) dom_ui. Review URL: http://codereview.chromium.org/126071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18353 0039d316-1c4b-4281-b951-d872f2087c98
* Headers cleanup in chrome/browser/phajdan.jr@chromium.org2009-06-032-0/+2
| | | | | | | | | | | - reduce header dependencies - miscellanous cleanups (add missing includes for OS_ defines etc) Further changesets may follow. I was only looking at header files up to character_encoding.h. Review URL: http://codereview.chromium.org/118072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17470 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup temp files/folders in a few more tests.munjal@chromium.org2009-06-011-1/+5
| | | | | | Review URL: http://codereview.chromium.org/118074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17359 0039d316-1c4b-4281-b951-d872f2087c98
* Fix namespace to ultimately compile on Macpinkerton@chromium.org2009-05-291-2/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/115924 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17187 0039d316-1c4b-4281-b951-d872f2087c98
* Make automation proxy objects to ref_counted. That allows to process async ↵stoyan@chromium.org2009-05-281-35/+34
| | | | | | | | | | | notifications directly in channel background thread. Add support for listener-less ChannelProxy. BUG=none TEST=none Review URL: http://codereview.chromium.org/113722 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17093 0039d316-1c4b-4281-b951-d872f2087c98
* More NotificationRegistrar conversions.pkasting@chromium.org2009-05-221-30/+11
| | | | | | | BUG=2381 Review URL: http://codereview.chromium.org/113736 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16700 0039d316-1c4b-4281-b951-d872f2087c98
* Enable one SessionRestoreUITest.huanr@chromium.org2009-05-141-49/+51
| | | | | | Review URL: http://codereview.chromium.org/113380 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16064 0039d316-1c4b-4281-b951-d872f2087c98
* Try fixing session restore UI tests.huanr@chromium.org2009-05-081-29/+30
| | | | | | | | | - Change async ApplyAccelerator to sync RunCommand. - Renable disabled tests. Review URL: http://codereview.chromium.org/113129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15612 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 15399.maruel@chromium.org2009-05-061-2/+2
| | | | | | | broke purify Review URL: http://codereview.chromium.org/115026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15409 0039d316-1c4b-4281-b951-d872f2087c98
* Change Browser::GetIndexOfController to GetIndexOfTabContents. Now that webrettw@chromium.org2009-05-061-2/+2
| | | | | | | | don't have tab contents switching, identifying tabs by their controller is weird, so we should gradually move to only using TabContents*. Review URL: http://codereview.chromium.org/115018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15399 0039d316-1c4b-4281-b951-d872f2087c98
* honor index in createTab()rafaelw@chromium.org2009-05-061-1/+1
| | | | | | | | | BUG=11200 R=brettw,beng Review URL: http://codereview.chromium.org/99300 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15392 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_vector.h and stl_util-inl.h to base/ben@chromium.org2009-05-058-12/+12
| | | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/107001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15272 0039d316-1c4b-4281-b951-d872f2087c98
* Replace all occurrances of WebContents with TabContents.brettw@chromium.org2009-05-042-6/+3
| | | | | | Review URL: http://codereview.chromium.org/99177 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15194 0039d316-1c4b-4281-b951-d872f2087c98
* Yet more deprecation of the wstring version of PathService::Get() for UI tests.thestig@chromium.org2009-05-021-3/+2
| | | | | | Review URL: http://codereview.chromium.org/99298 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15127 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bug in session restore on linux/mac. We were pickling thetc@google.com2009-05-012-14/+7
| | | | | | | | | | | | | | page title as a wstring, but reading it back as a string16. This allows the SessionRestoreUITests to pass. Also enable the inspector ui test which is currently disabled, but the code compiles fine on linux/mac. BUG=10516 Review URL: http://codereview.chromium.org/99297 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15109 0039d316-1c4b-4281-b951-d872f2087c98
* Restore closed tabs into new windows when necessary, and track the windows theypam@chromium.org2009-04-222-24/+57
| | | | | | | | | | | | | | | | | | | came from so they're restored together (into the same new window) when appropriate. Fix safety check on tab index when restoring: make it check the correct browser. Change some ASSERTs to EXPECTs in the unit test for greater coverage. BUG=5278 TEST=Open a window with two tabs, close both (closing the window), then restore both. Make sure both restored tabs are in the same window. Open a window with multiple tabs, close a tab, then close the window using its close box. Restore both and make sure the tab goes back into the window. Review URL: http://codereview.chromium.org/92001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14234 0039d316-1c4b-4281-b951-d872f2087c98
* Rename web_contents_view* files to tab_contents_view* to reflect my previousbrettw@chromium.org2009-04-211-1/+1
| | | | | | | rename of the classes. Review URL: http://codereview.chromium.org/87009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14083 0039d316-1c4b-4281-b951-d872f2087c98
* When restoring a closed tab using either ctrl-shift-T or the context menu, putpam@chromium.org2009-04-202-3/+34
| | | | | | | | | | | | | | | | | | | it back into the window it came from, at the tabstrip index it occupied before, and activate (select) both the window and the tab. Restoring a tab from the New Tab Page replaces the NTP, as before. If the window the tab was in no longer exists, put the tab at the end of the current window's tabstrip. This behavior may change in a later patch. BUG=5278 TEST=Open two windows, with >1 tabs each. Close a tab, not the one at the end, in one of the windows. Switch to the other window and choose "Undo Closed Tab" from the tabstrip context menu, or type ctrl-shift-T. The tab should be restored where it was, and activated (selected and brought to the front). Review URL: http://codereview.chromium.org/69015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14062 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land my change to clean up TabContents/WebContents ownership. Thisbrettw@chromium.org2009-04-204-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | is the same except in tab_strip_model_unittest I fixed a leak by making a WebContents on the stack, I added a factory to the SiteInstance unittest to prevent another leak, and I re-added a NULL set to the external_tab_container. Fix the ownership model of TabContents and NavigationController. Previously the NavigationController owned the TabContents, and there were extra steps required at creation and destruction to clean everything up properly. NavigationController is now a member of TabContents, and there is no setup or tear down necessary other than the constructor and destructor. I could remove the tab contents creation in the NavigationController, as well as all the weird destruction code in WebContents which got moved to the destructor. I made the controller getter return a reference since the ownership is clear and there is no possibility of NULL. This required changing a lot of tiles, but many of them were simplified since they no longer have to NULL check. Previous review URL: http://codereview.chromium.org/69043 Review URL: http://codereview.chromium.org/67294 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14053 0039d316-1c4b-4281-b951-d872f2087c98