Mojo: Add a platform interface for shared memory (embedder::PlatformSharedBuffer).

Make the existing RawSharedBuffer an implementation of that. Later,
we'll plumb in a "PlatformSupport" that'll produce these things, but for
now keep the (static) creation methods where they are.

R=darin@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289667 0039d316-1c4b-4281-b951-d872f2087c98
Check the Argument to the Catch Function

Due to promise chaining, the rejecting promise may not necessarily be the
topmost method returning the promise.

In this specific case, getAuth() is chained in by requestFromServer, and
getAuth can reject with no arguments.

The fix here is to ensure the argument is always an object.

BUG=402729

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289668 0039d316-1c4b-4281-b951-d872f2087c98
Mojo: clang-format mojo/public/c/... and add a presubmit check.

Note: clang-format misformats some C-style casts (in the C-compilable
parts of header files; e.g., it formats |(Foo)-5| as |(Foo) - 5|), but I
can live with that.

R=jamesr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289669 0039d316-1c4b-4281-b951-d872f2087c98
When in the task runner MessageLoop::current() returns NULL. Use the task runner instead of MessageLoop::current() to PostTask.

BUG=392621

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289670 0039d316-1c4b-4281-b951-d872f2087c98
battre adopts some Cookie.* and Extensions.Network* uma metrics

BUG=403776

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289671 0039d316-1c4b-4281-b951-d872f2087c98
Adding logging of offstore extensions state to user metrics.

BUG=395729

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289673 0039d316-1c4b-4281-b951-d872f2087c98
NaCl: Update revision in DEPS, r13611 -> r13613

This pulls in the following Native Client changes:

r13612: (mseaborn) Disable the imc_mem_obj_create() syscall by default
r13613: (dschuff) Update revision for PNaCl r13557->r13609

BUG=none
TEST=browser_tests and nacl_integration
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_rel_precise32,linux_nacl_sdk_build

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289675 0039d316-1c4b-4281-b951-d872f2087c98
Update .DEPS.git

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289676 0039d316-1c4b-4281-b951-d872f2087c98
Reorder the app order.

Loaded app comes first, and then mock icons follow. Otherwise,
the loaded calculator app icon won't appear in the new design
because the new design has three icons for apps.

BUG=None
R=oshima@chromium.org
TEST=manually

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289677 0039d316-1c4b-4281-b951-d872f2087c98
Rename various Geolocation bits for clarity and consistency.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289678 0039d316-1c4b-4281-b951-d872f2087c98
Enable test LayerTreeHostTestBreakSwapPromise with verbose logging information

The log of the flaky LayerTreeHostTestBreakSwapPromise test shows that

[ RUN      ] LayerTreeHostTestBreakSwapPromise.RunMultiThread_DelegatingRenderer_ImplSidePaint
c:\b\build\slave\win_x64_builder\build\src\cc\trees\layer_tree_host_unittest.cc(4500): error: Value of: swap_promise_result_[2].did_not_swap_called
Actual: false
Expected: true
c:\b\build\slave\win_x64_builder\build\src\cc\trees\layer_tree_host_unittest.cc(4501): error: Value of: swap_promise_result_[2].reason
Actual: 0
Expected: SwapPromise::SWAP_FAILS
Which is: 1
[  FAILED  ] LayerTreeHostTestBreakSwapPromise.RunMultiThread_DelegatingRenderer_ImplSidePaint (3 ms)

We have a EXPECT_TRUE on the SwapPromise's dtor to be called which passes.
It means we destroyed the SwapPromise without ever breaking them first
(no DidNotSwap ever called). I checked all the code path where we destroy
SwapPromise and we always break them first. So I can't figure out why it
is the case. I am adding some logging information and turn this test back
on, hopefully next time it fails on the bot I can use the extra logging
information to debug.

BUG=393995

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289679 0039d316-1c4b-4281-b951-d872f2087c98
Disable -Wmismatched-tags for mesa.

We build with 3rd-party code with -Wall on the clang/win bot. This has already
been fixed upstream, so there's no need to keep this around

https://github.com/grate-driver/mesa/commit/68a4bb553bcd51d336d95b0c845c0dc63adc3bd3

BUG=none
R=hans@chromium.org
TBR=cpu

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289680 0039d316-1c4b-4281-b951-d872f2087c98
Remove dependency on NavigationEntry to get a SiteInstance

Remove the dependency on a NavigationEntry in
RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation and
RenderFrameHostManager::GetSiteInstanceForEntry. This is needed by the
PlzNavigate project, as the SiteInstance to use is determined when the
navigation is about to commit. At this time, there is no convinient access to a
SNavigationEntry.

BUG=376082

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289681 0039d316-1c4b-4281-b951-d872f2087c98
[Local NTP] Implementing Material Design styling

We also want the "classical" NTP to coexist with the new design, and
switchable via Finch. Key changes:
- Adding classes to #ntp-content, then using CSS to control styling.
  - .classical for old NTP
  - .md for Material Design
  - .default-theme for values that will be overriden by themes. This is
    needed so dynamic CSS changes in setCustomThemeStyle() are not
    subsumed by specialized .classical and .md.
  - .dark: for dark background.
- The .mv-mask <div> is promoted to handle tile effects, including
  border, shadow, and background. Borders are drawn differently now.
  This lead to fix of 1px offset of .mv-title .

Some new designs are still in flux. Our goal is to get a reasonable bulk
committed for m38, then worry about some tune-ups later.

TEST=Run "chrome.exe --force-fieldtrials=MaterialDesignNTP/Enabled/",
visit chrome-search://local-ntp/local-ntp.html . If chrome.exe is run
without the switch, the local NTP should be identical to before, except
for 1px .mv-title shift.

BUG=400332

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289682 0039d316-1c4b-4281-b951-d872f2087c98
Remove restriction on x64 chromium linker builds.

As of r287591 the android chromium linker supports EM_X86_64 and x86_64
relocations.  Remove the restriction preventing libchromium_android_linker.so
building when arch=x64.

BUG=369133

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289683 0039d316-1c4b-4281-b951-d872f2087c98
bisect-builds.py: Cleanup the code related to bisecting official aura builds.

BUG=None
NOTRY=True

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289685 0039d316-1c4b-4281-b951-d872f2087c98
Add UMA stats for silence AudioInputController.

4 cases of silence during a session: no measurement, no silence, only silence and partial silence.

NOTRY=true

BUG=399835

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289688 0039d316-1c4b-4281-b951-d872f2087c98
Initial commit for battery auditing by website origin by profile.

This is part of Website Settings resource/permissions monitoring.

Design Doc: https://docs.google.com/document/d/1oQwmj3AU4QYhTyGrYEGr6zaZhHUfx-wqUgEcQGbUU-U/edit?usp=sharing

BUG=372607

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289689 0039d316-1c4b-4281-b951-d872f2087c98
Redesign the home card bottom state.

This CL also renames the class name to AthenaStartPageView
and I am expecting to use the same view to CENTERED state,
so that we can achieve the smooth state transition meanwhile.

BUG=401570
R=sadrul@chromium.org
TEST=manually

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289690 0039d316-1c4b-4281-b951-d872f2087c98
Allow the grit GN targets to specify an output name.

This resolves collisions if two grit targets with the same name (often
"resources") end up in the same output directory.

This reverts 289283 and replaces it with the unique output names rather than
the duplicative target names. The original problem was from 289264.

BUG=
R=joaodasilva@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289691 0039d316-1c4b-4281-b951-d872f2087c98