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

Side by Side Diff: chrome/browser/sessions/session_id.h

Issue 5610005: Makes instant run before unload listeners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Fix comments and reset session id appropriately Created 10 years 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_SESSIONS_SESSION_ID_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_ID_H_
6 #define CHROME_BROWSER_SESSIONS_SESSION_ID_H_ 6 #define CHROME_BROWSER_SESSIONS_SESSION_ID_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 // Returns the underlying id. 22 // Returns the underlying id.
23 id_type id() const { return id_; } 23 id_type id() const { return id_; }
24 24
25 private: 25 private:
26 friend class NavigationController; 26 friend class NavigationController;
27 friend class SessionService; 27 friend class SessionService;
28 28
29 explicit SessionID(id_type id) : id_(id) {} 29 explicit SessionID(id_type id) : id_(id) {}
30 30
31 // Resets the ID to 0.
32 void clear() { id_ = 0; }
33
34 // Resets the id. This is used when restoring a session 31 // Resets the id. This is used when restoring a session
35 void set_id(id_type id) { id_ = id; } 32 void set_id(id_type id) { id_ = id; }
36 33
37 id_type id_; 34 id_type id_;
38 }; 35 };
39 36
40 #endif // CHROME_BROWSER_SESSIONS_SESSION_ID_H_ 37 #endif // CHROME_BROWSER_SESSIONS_SESSION_ID_H_
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_unload_handler.cc ('k') | chrome/browser/tab_contents/navigation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698