Prefer opening PDF downloads in the browser.

PDFs in particular are safer to open in the browser. This patch changes
the handling of downloads to open such files in the browser by default
instead of the system handler for the file type. A "Open with system
handler" menu item will be available so that users can still use the
system application if needed.

The determination that a file is safer to handle in the browser is done
as follows:

a) DownloadTargetDeterminer determines whether the MIME type
   corresponding to the target filename of the download is one which is
   handled by the renderer or one that is handled by a sandboxed pepper
   plugin. If so, then the file is considered safely handled by the
   browser.

b) ChromeDownloadManagerDelegate determines whether opening in the
   browser is preferred for the file type assuming the browser is able
   to handle it safely. Currently this is true for .pdf files.

Opening behavior for a download will default to opening in the browser
if both results from a) and b) are true.

BUG=148492

TEST=(1) Make sure Chrome PDF Viewer is enabled in chrome://plugins.
     (2) Download a .pdf file.
     (3) Download shelf context menu should show "Open" and "Open with
         system handler" options.
     (4) "Open" as well as clicking on the shelf icon and clicking on
         the download in chrome://downloads should all result in opening
         the file within the browser.
     (5) "Open with system handler" should open the .pdf with the
         application that's set up as the default handler for .pdf files
         on the users' machine.

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=233460
Reverted : https://src.chromium.org/viewvc/chrome?view=rev&revision=233497

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234031 0039d316-1c4b-4281-b951-d872f2087c98
Refactor the GN threading model to reduce locking and simplify execution.

Old design: item_tree manages dependency resolution, target_manager creates and hooks up the target dependencies, and the toolchain manager does all kinds of crazy ordering and loading stuff on every thread. There is lots of locking every time the dependency tree is modified.

This patch completely deletes the toolchain manager, item tree, item node, and target manager.

The new design is that the build files are executed on background threads, but then they come back to the main thread which assembles the dependency tree and schedules other file loads. This eliminates almost all locking and a lot of complexity.

The Loader now manages loading the different build files in the correct context, and managing dependencies (loading the build config first, for example). The Builder manages the dependency tree and requests that the Loader load files that it encounters references to.

This simpler design reduces non-test code by ~350 lines. In the current gn build, lock acquisitions go down from 1808 to 116 and it saves about 20ms wall clock time (8% faster). This is a bit deceiving, though, because most of the time is spent on pkg-config which is constant. It speeds up running individual build files by 1000-1500%.

The work of putting the tree together that used to take up this time inside locks is now transferred to the main thread, which looks like it is *sometimes* a bottleneck. This should be easier to optimize in the future, though.

Other tweaks:
 - I fixed cycle finding
 - Directories look prettier on Windows using the "desc" command
 - Tracing output now includes the main thread and marks it as such
 - I updated the base BUILD.gn file for the more recent tree.

R=scottmg@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234032 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 234031
Adding Google Maps pixel test

BUG=143317

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234033 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 234033
Disabled ppapi browsertests for TCPSocket due to flakiness.

BUG=316933

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