Re-reland Integrate invalidation API into ChromeToMobileService.
A continuation of http://codereview.chromium.org/10869002

r152745 reverted 2nd attempt r152735 for Mac clobber build break:
/b/build/slave/Mac/build/src/chrome/browser/chrome_to_mobile_service.cc:42:10: fatalerror: 'google/cacheinvalidation/types.pb.h' file not found
http://build.chromium.org/p/chromium/builders/Mac/builds/16802/steps/compile/logs/stdio#error1

Add cacheinvalidation[_proto_cpp] dependency to chrome_browser.gypi.
This fixes my xcodebuild locally (not repro through ninja, etc.)

Remaining description matches that of the second CL:
====================================================
Reland Integrate invalidation API into ChromeToMobileService.
A continuation of http://codereview.chromium.org/10834203

r152609 reverted original r152609 for debug test crashes:
http://build.chromium.org/p/chromium/builders/Mac%2010.7%20Tests%20%28dbg%29%284%29/builds/100/steps/browser_tests/logs/stdio

Move dtor logic to a ProfileKeyedService::Shutdown OVERRIDE.
This fixes the problem locally (we have no debug trybots?).

Remaining description matches that of the original CL:
======================================================
Integrate invalidation API into ChromeToMobileService.

Update chrome/browser/DEPS with new dependencies:
(google/cacheinvalidation and sync/notifier)

Observe Sync Notifier invalidation notifications:
(depend on this service for mobile list updates)
(refresh the device list on cloud print invalidation)

Remove RequestMobileListUpdate, timestamp, & account info:
(no longer needed with invalidation integration)
(just set command state and icon visibility w/HasMobiles)

Lazily init the access token, queue search/send operations:
(only get an access token as needed, add |task_queue_|)

Allow concurrent cloud print device search requests:
(handle user-triggered updates while fetching the list)

Misc cleanup (CloudPrintUrl handling, tests, etc.)

TODO(followup): Additional logging, tests, invalidation ack.

BUG=102709,137086,133352
TEST=Chrome To Mobile devices update with cloud print!
TBR=sky@chromium.org,erg@chromium.org,sail@chromium.org,akalin@chromium.org,thakis@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10876009

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