Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: chrome/browser/chrome_to_mobile_service.cc

Issue 11052007: Rename ModelType/ObjectIdStateMap to InvalidationMap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_to_mobile_service.h" 5 #include "chrome/browser/chrome_to_mobile_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/guid.h" 10 #include "base/guid.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 UpdateCommandState(); 418 UpdateCommandState();
419 } 419 }
420 420
421 void ChromeToMobileService::OnInvalidatorStateChange( 421 void ChromeToMobileService::OnInvalidatorStateChange(
422 syncer::InvalidatorState state) { 422 syncer::InvalidatorState state) {
423 sync_invalidation_enabled_ = (state == syncer::INVALIDATIONS_ENABLED); 423 sync_invalidation_enabled_ = (state == syncer::INVALIDATIONS_ENABLED);
424 UpdateCommandState(); 424 UpdateCommandState();
425 } 425 }
426 426
427 void ChromeToMobileService::OnIncomingInvalidation( 427 void ChromeToMobileService::OnIncomingInvalidation(
428 const syncer::ObjectIdStateMap& id_state_map, 428 const syncer::ObjectIdInvalidationMap& invalidation_map,
429 syncer::IncomingInvalidationSource source) { 429 syncer::IncomingInvalidationSource source) {
430 DCHECK_EQ(1U, id_state_map.size()); 430 DCHECK_EQ(1U, invalidation_map.size());
431 DCHECK_EQ(1U, id_state_map.count(invalidation::ObjectId( 431 DCHECK_EQ(1U, invalidation_map.count(invalidation::ObjectId(
432 ipc::invalidation::ObjectSource::CHROME_COMPONENTS, 432 ipc::invalidation::ObjectSource::CHROME_COMPONENTS,
433 kSyncInvalidationObjectIdChromeToMobileDeviceList))); 433 kSyncInvalidationObjectIdChromeToMobileDeviceList)));
434 RequestDeviceSearch(); 434 RequestDeviceSearch();
435 } 435 }
436 436
437 const std::string& ChromeToMobileService::GetAccessTokenForTest() const { 437 const std::string& ChromeToMobileService::GetAccessTokenForTest() const {
438 return access_token_; 438 return access_token_;
439 } 439 }
440 440
441 void ChromeToMobileService::SetAccessTokenForTest( 441 void ChromeToMobileService::SetAccessTokenForTest(
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 701
702 // Report failure below and ignore the second response. 702 // Report failure below and ignore the second response.
703 request_observer_map_.erase(other); 703 request_observer_map_.erase(other);
704 break; 704 break;
705 } 705 }
706 } 706 }
707 707
708 if (observer.get()) 708 if (observer.get())
709 observer->OnSendComplete(success); 709 observer->OnSendComplete(success);
710 } 710 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698