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

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

Issue 137263007: Move CancelableTaskTracker to //base/task/CancelableTaskTracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move to base/task/cancelable_task_tracker* Created 6 years, 10 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
« no previous file with comments | « chrome/browser/sessions/session_service.h ('k') | chrome/browser/sync/glue/favicon_cache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/sessions/session_service.h" 5 #include "chrome/browser/sessions/session_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 const SessionID& window_id, 490 const SessionID& window_id,
491 const SessionID& tab_id, 491 const SessionID& tab_id,
492 const std::string& user_agent_override) { 492 const std::string& user_agent_override) {
493 if (!ShouldTrackChangesToWindow(window_id)) 493 if (!ShouldTrackChangesToWindow(window_id))
494 return; 494 return;
495 495
496 ScheduleCommand(CreateSetTabUserAgentOverrideCommand( 496 ScheduleCommand(CreateSetTabUserAgentOverrideCommand(
497 kCommandSetTabUserAgentOverride, tab_id.id(), user_agent_override)); 497 kCommandSetTabUserAgentOverride, tab_id.id(), user_agent_override));
498 } 498 }
499 499
500 CancelableTaskTracker::TaskId SessionService::GetLastSession( 500 base::CancelableTaskTracker::TaskId SessionService::GetLastSession(
501 const SessionCallback& callback, 501 const SessionCallback& callback,
502 CancelableTaskTracker* tracker) { 502 base::CancelableTaskTracker* tracker) {
503 // OnGotSessionCommands maps the SessionCommands to browser state, then run 503 // OnGotSessionCommands maps the SessionCommands to browser state, then run
504 // the callback. 504 // the callback.
505 return ScheduleGetLastSessionCommands( 505 return ScheduleGetLastSessionCommands(
506 base::Bind(&SessionService::OnGotSessionCommands, 506 base::Bind(&SessionService::OnGotSessionCommands,
507 base::Unretained(this), callback), 507 base::Unretained(this), callback),
508 tracker); 508 tracker);
509 } 509 }
510 510
511 void SessionService::Save() { 511 void SessionService::Save() {
512 bool had_commands = !pending_commands().empty(); 512 bool had_commands = !pending_commands().empty();
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1776 return; 1776 return;
1777 } 1777 }
1778 1778
1779 // Check for any open windows for the current profile that we aren't tracking. 1779 // Check for any open windows for the current profile that we aren't tracking.
1780 for (chrome::BrowserIterator it; !it.done(); it.Next()) { 1780 for (chrome::BrowserIterator it; !it.done(); it.Next()) {
1781 if ((*it)->profile() == profile()) 1781 if ((*it)->profile() == profile())
1782 return; 1782 return;
1783 } 1783 }
1784 DeleteSessionOnlyData(profile()); 1784 DeleteSessionOnlyData(profile());
1785 } 1785 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_service.h ('k') | chrome/browser/sync/glue/favicon_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698