[sync] Clean up ProfileSyncServiceHarness: Eliminate state change machine

ProfileSyncServiceHarness is a class used by the desktop integration
tests to wait for adequate periods of time for various sync operations
to complete. Internally, it implements a state change machine, that over
time, has accumulated several new states, making the class brittle and
prone to bugs.

This CL is the first in a series of CLs to clean up the class, make it
less prone to errors, and as far as possible, eliminate dependencies on
internal details of implementation in ProfileSyncService.

This CL does the following:
1) Gets rid of the state change machine and WaitStates in PSSHarness.
2) Defines StatusChangeChecker, a callback mechanism that allows us to
   wait on arbitrary changes to the state of the sync engine.
3) Implements AwaitStatusChange, a function that takes a
   StatusChangeChecker and waits until its criteria are satisfied.
4) Splits up the logic in RunStateChangeMachine function into separate
   helper functions that do not depend on past WaitStates.
5) Fixes a TODO and changes EnableEncryptionForType to EnableEncryption.
6) Gets rid of the "reason" string that was being passed in by numerous
   tests while calling various Await* methods. If a call to Await* times
   out, PSSHarness will take care of logging a meaningful reason for the
   failure.
7) Fixes a bug where we were neglecting to mark sync setup as complete
   after entering a custom passphrase. (This only affects select tests
   involving custom passphrases.)

BUG=323380,95619
TEST=sync_integration_tests

Review URL: https://codereview.chromium.org/83363006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240757 0039d316-1c4b-4281-b951-d872f2087c98
Tweak to Incognito page wording

It now says:

<b>You've gone incognito.</b> Pages you view in incognito tabs won't stick around in your browser's history, cookie store, or search history after you've closed all of your incognito tabs. Any files you download or bookmarks you create will be kept. 
<br>
<b>However, you aren't invisible.</b> Going incognito doesn't hide your browsing from your employer, your internet service provider, or the websites you visit.

Goal is to increase emphasis on what incognito *doesn't* provide.

BUG=70664
R=palmer@chromium.org

Review URL: https://codereview.chromium.org/114893005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240758 0039d316-1c4b-4281-b951-d872f2087c98
Fix potential flake in PrerenderBrowserTest.PrerenderPageNewTab.

When the swap starts, about:blank hasn't finished loading yet. If the merge
takes too long, the ProvisionalChangeToMainFrameUrl from the previous
navigation may creep in and we incorrectly cancel the pending swap. This race
isn't a problem for correctness since it is always safe to cancel the pending
swap, though it is a case where we don't swap when we potentially could in the
event of a very very tight race occurring. To avoid it flaking the test, wait
for about:blank in the new tab to load first.

Triggered flake by increasing the merge timeout and putting a sleep in
DOMStorageNamespace::Merge.

BUG=none
TEST=PrerenderBrowserTest.PrerenderPageNewTab

Review URL: https://codereview.chromium.org/115263003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240759 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 240758
SVN changes up to revision 240759