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

Side by Side Diff: chrome/browser/sync/glue/session_change_processor.cc

Issue 7981006: [Sync] use base::Time in sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux compile errors Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/sync/glue/session_change_processor.h" 5 #include "chrome/browser/sync/glue/session_change_processor.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 if (specifics.session_tag() == 237 if (specifics.session_tag() ==
238 session_model_associator_->GetCurrentMachineTag() && 238 session_model_associator_->GetCurrentMachineTag() &&
239 !setup_for_test_) { 239 !setup_for_test_) {
240 // We should only ever receive a change to our own machine's session info 240 // We should only ever receive a change to our own machine's session info
241 // if encryption was turned on. In that case, the data is still the same, 241 // if encryption was turned on. In that case, the data is still the same,
242 // so we can ignore. 242 // so we can ignore.
243 LOG(WARNING) << "Dropping modification to local session."; 243 LOG(WARNING) << "Dropping modification to local session.";
244 StartObserving(); 244 StartObserving();
245 return; 245 return;
246 } 246 }
247 const int64 mtime = sync_node.GetModificationTime(); 247 const base::Time& mtime = sync_node.GetModificationTime();
248 // Model associator handles foreign session update and add the same. 248 // Model associator handles foreign session update and add the same.
249 session_model_associator_->AssociateForeignSpecifics(specifics, mtime); 249 session_model_associator_->AssociateForeignSpecifics(specifics, mtime);
250 } 250 }
251 251
252 // Notify foreign session handlers that there are new sessions. 252 // Notify foreign session handlers that there are new sessions.
253 NotificationService::current()->Notify( 253 NotificationService::current()->Notify(
254 chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED, 254 chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED,
255 NotificationService::AllSources(), 255 NotificationService::AllSources(),
256 NotificationService::NoDetails()); 256 NotificationService::NoDetails());
257 257
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 NotificationService::AllBrowserContextsAndSources()); 295 NotificationService::AllBrowserContextsAndSources());
296 } 296 }
297 297
298 void SessionChangeProcessor::StopObserving() { 298 void SessionChangeProcessor::StopObserving() {
299 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 299 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
300 DCHECK(profile_); 300 DCHECK(profile_);
301 notification_registrar_.RemoveAll(); 301 notification_registrar_.RemoveAll();
302 } 302 }
303 303
304 } // namespace browser_sync 304 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncer_util.cc ('k') | chrome/browser/sync/glue/session_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698