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

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

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 NewCallback(this, &SessionService::OnGotSessionCommands), 410 NewCallback(this, &SessionService::OnGotSessionCommands),
411 callback), consumer); 411 callback), consumer);
412 } 412 }
413 413
414 SessionService::Handle SessionService::GetCurrentSession( 414 SessionService::Handle SessionService::GetCurrentSession(
415 CancelableRequestConsumerBase* consumer, 415 CancelableRequestConsumerBase* consumer,
416 SessionCallback* callback) { 416 SessionCallback* callback) {
417 if (pending_window_close_ids_.empty()) { 417 if (pending_window_close_ids_.empty()) {
418 // If there are no pending window closes, we can get the current session 418 // If there are no pending window closes, we can get the current session
419 // from memory. 419 // from memory.
420 scoped_refptr<InternalSessionRequest> request = new InternalSessionRequest( 420 scoped_refptr<InternalSessionRequest> request(new InternalSessionRequest(
421 NewCallback(this, &SessionService::OnGotSessionCommands), 421 NewCallback(this, &SessionService::OnGotSessionCommands),
422 callback); 422 callback));
423 AddRequest(request, consumer); 423 AddRequest(request, consumer);
424 IdToRange tab_to_available_range; 424 IdToRange tab_to_available_range;
425 std::set<SessionID::id_type> windows_to_track; 425 std::set<SessionID::id_type> windows_to_track;
426 BuildCommandsFromBrowsers(&(request->commands), 426 BuildCommandsFromBrowsers(&(request->commands),
427 &tab_to_available_range, 427 &tab_to_available_range,
428 &windows_to_track); 428 &windows_to_track);
429 request->ForwardResult( 429 request->ForwardResult(
430 BaseSessionService::InternalGetCommandsRequest::TupleType( 430 BaseSessionService::InternalGetCommandsRequest::TupleType(
431 request->handle(), request)); 431 request->handle(), request));
432 return request->handle(); 432 return request->handle();
(...skipping 1033 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 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_test.cc ('k') | chrome/browser/ssl/ssl_host_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698