summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions
Commit message (Collapse)AuthorAgeFilesLines
* Porting unit tests in chrome/phajdan.jr@chromium.org2009-03-171-5/+7
| | | | | | | | | | | | | | | | | Enable following tests on Linux: browser/autocomplete/autocomplete_unittest.cc browser/navigation_controller_unittest.cc browser/search_engines/template_url_model_unittest.cc browser/sessions/session_backend_unittest.cc browser/tab_contents/web_contents_unittest.cc Remove not-existing file from remove list for Linux. Check for zero-size write in SessionBackend because it's an error in POSIX (but is ok from the session backend's perspective). Review URL: http://codereview.chromium.org/42223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11852 0039d316-1c4b-4281-b951-d872f2087c98
* Removed unneeded includes of base/time.h.thestig@chromium.org2009-03-161-1/+0
| | | | | | Review URL: http://codereview.chromium.org/48019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11766 0039d316-1c4b-4281-b951-d872f2087c98
* Moving the storing/restoring of the focus from TabContents to ↵jcampan@chromium.org2009-03-121-1/+6
| | | | | | | | | | | | WebContentsView. This makes TabContents less dependent on views. This requires few contortions with DOMUIs (NTP, history and downloads tab) as they still need to set the initial focus specifically. BUG=None TEST=Run the interactive tests. Review URL: http://codereview.chromium.org/39269 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11501 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-101-1/+0
| | | | | | | | | Normalize end of file newlines in chrome/. All files end in a single newline. Review URL: http://codereview.chromium.org/42015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11331 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes session restore bug where we wouldn't necessarily correctlysky@google.com2009-03-091-1/+3
| | | | | | | | | | | | | | | restore the maximized state. The problem was we were using a boolean when we really needed three values: use the default, explicitly maximized or explicitly normal. I'm also removing a bogus DLOG in info_bubble. BUG=7930 TEST=see bug Review URL: http://codereview.chromium.org/40306 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11287 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes possible crash in SessionBackend. I believe what's happeningsky@google.com2009-03-093-7/+62
| | | | | | | | | | | | | | | | | | | | here is we fail to create the file, and so current_session_file_.get() is NULL and we crash. current_session_file_.get() is NULL if OpenAndWriteHeader returns NULL (which is does if the full header isn't written correctly. Here's how I'm changing the code: . The file is now truncated instead of closed/reopened. Hopefully this avoids the possibility of a scanner locking the file and the delete failing. . Added a unit test for coverage of truncation. . The file is opened in exclusive access. There is no reason why a scanner should open this file. . Added null checks. BUG=8476 TEST=none Review URL: http://codereview.chromium.org/39275 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11262 0039d316-1c4b-4281-b951-d872f2087c98
* Run more unit tests on Linux:phajdan.jr@chromium.org2009-03-097-68/+85
| | | | | | | | | | | | | | | | - used string16 instead of wstring where needed - replaced GetTickCount calls with portable functions from base/time.h - misc GCC cleanups - enabled following unit tests on Linux: browser/autocomplete/history_contents_provider_unittest.cc browser/autocomplete/history_url_provider_unittest.cc browser/autocomplete/keyword_provider_unittest.cc browser/bookmarks/bookmark_html_writer_unittest.cc Review URL: http://codereview.chromium.org/39335 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11249 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGE.maruel@google.com2009-03-051-1/+2
| | | | | | | Split the lines >80 cols. (Part 1) Review URL: http://codereview.chromium.org/39206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11032 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes CRLF and trailing white spaces.maruel@chromium.org2009-03-054-4/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
* Fix 16/wide build bustange on non-Windows.brettw@chromium.org2009-03-041-1/+1
| | | | | | Review URL: http://codereview.chromium.org/39116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10876 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the build with some forgotten string conversions on non-Windows.brettw@chromium.org2009-03-041-1/+2
| | | | | | Review URL: http://codereview.chromium.org/40099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10875 0039d316-1c4b-4281-b951-d872f2087c98
* Convert NavigationEntry title to string16. TabContents::GetTitle no longer needsbrettw@chromium.org2009-03-041-1/+1
| | | | | | | | | | | | | | | to be virtual, either. This also changes how the display URL is computed. Instead of doing it preemptively, we now do so lazily. This allows us to do the URL formatting correctly using the elider so that we can do IDN and unescaping. I changed string_util's singleton functions. I was worried that other code might make a singleton of string, which would give you this same value as a non-const string. This would mean our empty strings might no longer be empty. Review URL: http://codereview.chromium.org/39022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10872 0039d316-1c4b-4281-b951-d872f2087c98
* This CL addresses several issues with focus in application mode:jcampan@chromium.org2009-02-261-2/+2
| | | | | | | | | | | | | - when started, the focus was not on the page (it was on the location bar, which is not shown) - ALT-F4 would not work at that point since the location bar was focused but not showing - since the location bar was focusable, tabbing through would focus it (causing the focus to go to the top window). BUG=8124,6046,8126 TEST=See bugs. R=sky Review URL: http://codereview.chromium.org/28202 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10504 0039d316-1c4b-4281-b951-d872f2087c98
* Relanding the following:jcampan@chromium.org2009-02-261-0/+3
| | | | | | | | | | | | | | When restoring a session, the browser is shown after a tab is selected causing the focus to be on the location bar (not tab contents for web pages). This CL ensures the tab decides where the focus should be after the browser is shown. BUG=6000 TEST=See bug R=sky Review URL: http://codereview.chromium.org/28156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10488 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 10400.jcampan@chromium.org2009-02-251-3/+0
| | | | | | | Reverting broke the linux build Review URL: http://codereview.chromium.org/27178 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10402 0039d316-1c4b-4281-b951-d872f2087c98
* When restoring a session, the browser is shown after a tab is selected ↵jcampan@chromium.org2009-02-251-0/+3
| | | | | | | | | | | | | causing the focus to be on the location bar (not tab contents for web pages). This CL ensures the tab decides where the focus should be after the browser is shown. BUG=6000 TEST=See bug R=sky Review URL: http://codereview.chromium.org/28152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10400 0039d316-1c4b-4281-b951-d872f2087c98
* Use string for Histogram names since these are all ASCII anyway.dsh@google.com2009-02-241-6/+6
| | | | | | | | Wide-character literals cause problems between platforms. Review URL: http://codereview.chromium.org/28046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10276 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt at fixing flakeyness when running session restore ui tests insky@google.com2009-02-241-9/+11
| | | | | | | | | | | | | purify. I believe the ui test isn't waiting for the session restore to complete, so that when the ui test does various asserts the state of the browser is wrong. BUG=6495 TEST=covered by tests Review URL: http://codereview.chromium.org/28051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10268 0039d316-1c4b-4281-b951-d872f2087c98
* Renables the session restore ui tests in hopes of finding out why theysky@google.com2009-02-181-4/+6
| | | | | | | | | | | | are flakey. I'll watch the bot to see where they are failing after landing. Also fixes leaks in the tests I noticed when run under Purify. BUG=6495 TEST=none Review URL: http://codereview.chromium.org/20477 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9991 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up some includes in sessions/ directory.estade@chromium.org2009-02-153-13/+2
| | | | | | Review URL: http://codereview.chromium.org/21379 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9830 0039d316-1c4b-4281-b951-d872f2087c98
* Use the ALLOW_THIS_IN_INITIALIZER_LIST instead of a pragma.jhawkins@chromium.org2009-02-141-4/+1
| | | | | | | R=dank Review URL: http://codereview.chromium.org/21378 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9829 0039d316-1c4b-4281-b951-d872f2087c98
* Make base_session_service.cc compile on Posix.jhawkins@chromium.org2009-02-145-31/+13
| | | | | | Review URL: http://codereview.chromium.org/21377 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9828 0039d316-1c4b-4281-b951-d872f2087c98
* Make session_restore.cc compile on Posix.jhawkins@chromium.org2009-02-142-3/+8
| | | | | | Review URL: http://codereview.chromium.org/21376 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9826 0039d316-1c4b-4281-b951-d872f2087c98
* Port session_backend.cc to Posix.jhawkins@chromium.org2009-02-149-85/+95
| | | | | | | | | * Using FilePath for paths instead of wstring. * File operations using cross-platform FileStream instead of win32 API. Review URL: http://codereview.chromium.org/20327 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9811 0039d316-1c4b-4281-b951-d872f2087c98
* Make tab_restore_service.cc compile on Mac and Linux.jhawkins@chromium.org2009-02-122-3/+14
| | | | | | Review URL: http://codereview.chromium.org/23022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9632 0039d316-1c4b-4281-b951-d872f2087c98
* Make session_service.cc compile on Mac and Linux.jhawkins@chromium.org2009-02-112-6/+21
| | | | | | Review URL: http://codereview.chromium.org/23018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9608 0039d316-1c4b-4281-b951-d872f2087c98
* Remove most header file dependencies on the notification type list. It isbrettw@chromium.org2009-02-013-23/+25
| | | | | | | | | | | really painful to add more types, since lots of headers include the notification service to derive from the notification observer. This splits that out, so much less of the project should end up including notification_types.h ---Paths modified but not in any changelist: Review URL: http://codereview.chromium.org/19744 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98
* Provide the option for HTTPServer to be created with a specificsky@google.com2009-01-291-1/+1
| | | | | | | | | | | | | | | MessageLoop. I'm going to need this when running ui tests in process. In this case I'll pass in the IO thread. I'll change all callers to use the new method, but before doing that wanted to make sure you're ok with it. BUG=none TEST=none Review URL: http://codereview.chromium.org/19039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8915 0039d316-1c4b-4281-b951-d872f2087c98
* Porting profiles to the Mac.avi@chromium.org2009-01-281-1/+2
| | | | | | Review URL: http://codereview.chromium.org/19623 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8831 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes possible crash in restoring a previously closed window. Thesky@google.com2009-01-261-0/+3
| | | | | | | | | | | | crash would occur if we pruned a tab and the index of selected tab was > tab_count - pruned_count. BUG=none TEST=make sure no problems with restoring closed windows. Review URL: http://codereview.chromium.org/18737 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8640 0039d316-1c4b-4281-b951-d872f2087c98
* Two things:ben@chromium.org2009-01-241-0/+1
| | | | | | | | | - remove views dependencies from browser by moving profile related dialog actions into BrowserWindow. - simplify the include dependencies in TabStripModel (making it easier to bring up on mac) by implementing more of its high level functionality in the delegate. Review URL: http://codereview.chromium.org/18736 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8606 0039d316-1c4b-4281-b951-d872f2087c98
* Replace cases of Append(FILE_PATH_LITERAL()) with AppendASCII("").deanm@chromium.org2009-01-221-4/+4
| | | | | | Review URL: http://codereview.chromium.org/18499 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8454 0039d316-1c4b-4281-b951-d872f2087c98
* Make CommandLine into a normal object, with some statics for getting at the ↵evan@chromium.org2009-01-211-9/+7
| | | | | | | | | | | current process's command line. One explicit goal of this change is to *not* deal with the string/wstring issues at the API on POSIX; the functions are the same as before, which means they remain as broken as before. (I did try to fix the internals, though, so migrating the callers is now possible by adding platform-appropriate hooks.) Review URL: http://codereview.chromium.org/18248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8347 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of TabContents related files into a tab_contents subdirben@chromium.org2009-01-157-12/+12
| | | | | | Review URL: http://codereview.chromium.org/18250 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8058 0039d316-1c4b-4281-b951-d872f2087c98
* More ui_test purify changes.paulg@google.com2009-01-151-17/+17
| | | | | | Review URL: http://codereview.chromium.org/18069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8052 0039d316-1c4b-4281-b951-d872f2087c98
* Add FTP unit test in preparation for portable FTP implementation.erikkay@google.com2009-01-081-2/+4
| | | | | | | | | | | | Clean up test server code. Originally from issue 12939, written by Ibrar Ahmed (ibrar.ahmed@gmail.com) (take 2) Review URL: http://codereview.chromium.org/17040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7755 0039d316-1c4b-4281-b951-d872f2087c98
* This is a redo of my previous notification registrar change. I saw a crash ↵brettw@chromium.org2009-01-062-26/+15
| | | | | | | | | in handling NAV_ENTRY_COMMITTED, so am changing all consumers of this to use the registrar so that it is impossible to forget to unregister. The difference is that in tab_contents I moved the removal code in RemoveInfoBar to only remove the listener if an infobar was actually removed. Review URL: http://codereview.chromium.org/16534 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7589 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 7581.brettw@chromium.org2009-01-062-15/+26
| | | | | | Review URL: http://codereview.chromium.org/17069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7582 0039d316-1c4b-4281-b951-d872f2087c98
* Change all classes that use the NOTIFY_NAV_ENTRY_COMMITTED notification to ↵brettw@chromium.org2009-01-062-26/+15
| | | | | | | | use the notification registrar. This is a speculative fix for a crash I happened to catch in a debugger where the pointer was invalid when dispatching this notifcation. It could be one of these consumers is leaking it's registered observer (the TabContents is the most suspicious one). Review URL: http://codereview.chromium.org/16519 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7581 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 7508.7509 and 7510nsylvain@chromium.org2008-12-301-4/+2
| | | | | | Review URL: http://codereview.chromium.org/17030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7514 0039d316-1c4b-4281-b951-d872f2087c98
* Add FTP unit test in preparation for portable FTP implementation.erikkay@google.com2008-12-301-2/+4
| | | | | | | | | | | Clean up test server code. Originally from issue 12939, written by Ibrar Ahmed (ibrar.ahmed@gmail.com) Review URL: http://codereview.chromium.org/16490 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7508 0039d316-1c4b-4281-b951-d872f2087c98
* Makes the tab restore service contain any windows that were open atsky@google.com2008-12-184-30/+330
| | | | | | | | | | | | | the time of a crash. BUG=5465 TEST=Bring up chrome, go to google.com. Wait a minute. Kill chrome via the task manager. Launch chrome again. Make sure the new tab page shows an entry named 'Window (g)' where g is Google's favicon. Review URL: http://codereview.chromium.org/14172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7188 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes two session restore bugs:sky@google.com2008-12-111-1/+6
| | | | | | | | | | | | | | | | . If the user launches incognito we don't attempt to restore last session and instead just do default launch behavior (new tab page). . Don't show the session restore info bar when launched incognito. I'm assuming that if the user launched in incognito they were previously running incognito so that there is nothing to restore. BUG=4381 5119 TEST=turn on session restore and launch with --incognito, make sure the incognito window comes up. Review URL: http://codereview.chromium.org/13368 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6776 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup, part 1.pkasting@chromium.org2008-12-081-4/+4
| | | | | | | | | | | | | | * Consistently use underscores between words in identifiers (IDC_NEWTAB -> IDC_NEW_TAB) * Make some identifiers clearer or more up-to-date (IDC_DUPLICATE -> IDC_DUPLICATE_TAB, IDC_GOOFFTHERECORD -> IDC_NEW_INCOGNITO_WINDOW, IDC_NEWPROFILEWINDOW -> IDC_PROFILE_MENU) * Try and make string identifiers (IDS_xxx) match their corresponding IDC_xxx commands. Tony tells me this will not cause any need for retranslation. * As much as possible (without modifying automated UI test XML files), use "Bookmark Bar", not "Bookmarks Bar" (this seemed to be prevailing usage in the code) * Fix 80-column issues This patch touches move files than any subsequent patches, but should be the most rubber-stampable. Review URL: http://codereview.chromium.org/13633 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6535 0039d316-1c4b-4281-b951-d872f2087c98
* Makes the tab restore service persist closed tabs/windows to disk andsky@google.com2008-12-0622-0/+5575
reload them when asked. Sorry for largish looking change. It's made big by refactoring common code between TabRestoreService and SessionService into a common superclass. At the same time I removed some dead code and shuffled the session related classes into a single directory for easier perusal. BUG=384 TEST=close the browser, start the browser and make sure the new tab page shows closed windows/tabs from the previous session. Review URL: http://codereview.chromium.org/13152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6490 0039d316-1c4b-4281-b951-d872f2087c98