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

Side by Side Diff: chrome/browser/sessions/session_service.cc

Issue 3825005: Fix syncing of sessions. Numerous changes have been made. Currently, the mode... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebased again Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/sessions/session_service.h" 7 #include "chrome/browser/sessions/session_service.h"
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } 440 }
441 441
442 void SessionService::Save() { 442 void SessionService::Save() {
443 bool had_commands = !pending_commands().empty(); 443 bool had_commands = !pending_commands().empty();
444 BaseSessionService::Save(); 444 BaseSessionService::Save();
445 if (had_commands) { 445 if (had_commands) {
446 RecordSessionUpdateHistogramData(NotificationType::SESSION_SERVICE_SAVED, 446 RecordSessionUpdateHistogramData(NotificationType::SESSION_SERVICE_SAVED,
447 &last_updated_save_time_); 447 &last_updated_save_time_);
448 NotificationService::current()->Notify( 448 NotificationService::current()->Notify(
449 NotificationType::SESSION_SERVICE_SAVED, 449 NotificationType::SESSION_SERVICE_SAVED,
450 NotificationService::AllSources(), 450 Source<Profile>(profile()),
451 NotificationService::NoDetails()); 451 NotificationService::NoDetails());
452 } 452 }
453 } 453 }
454 454
455 void SessionService::Init() { 455 void SessionService::Init() {
456 // Register for the notifications we're interested in. 456 // Register for the notifications we're interested in.
457 registrar_.Add(this, NotificationType::TAB_PARENTED, 457 registrar_.Add(this, NotificationType::TAB_PARENTED,
458 NotificationService::AllSources()); 458 NotificationService::AllSources());
459 registrar_.Add(this, NotificationType::TAB_CLOSED, 459 registrar_.Add(this, NotificationType::TAB_CLOSED,
460 NotificationService::AllSources()); 460 NotificationService::AllSources());
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 50); 1466 50);
1467 if (use_long_period) { 1467 if (use_long_period) {
1468 std::string long_name_("SessionRestore.SaveLongPeriod"); 1468 std::string long_name_("SessionRestore.SaveLongPeriod");
1469 UMA_HISTOGRAM_CUSTOM_TIMES(long_name_, 1469 UMA_HISTOGRAM_CUSTOM_TIMES(long_name_,
1470 delta, 1470 delta,
1471 save_delay_in_mins_, 1471 save_delay_in_mins_,
1472 save_delay_in_hrs_, 1472 save_delay_in_hrs_,
1473 50); 1473 50);
1474 } 1474 }
1475 } 1475 }
1476
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_restore.cc ('k') | chrome/browser/sync/glue/autofill_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698