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

Side by Side Diff: components/sessions/core/session_backend.h

Issue 1912843002: Convert //components/sessions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef COMPONENTS_SESSIONS_CORE_SESSION_BACKEND_H_ 5 #ifndef COMPONENTS_SESSIONS_CORE_SESSION_BACKEND_H_
6 #define COMPONENTS_SESSIONS_CORE_SESSION_BACKEND_H_ 6 #define COMPONENTS_SESSIONS_CORE_SESSION_BACKEND_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/task/cancelable_task_tracker.h" 15 #include "base/task/cancelable_task_tracker.h"
16 #include "components/sessions/core/base_session_service.h" 16 #include "components/sessions/core/base_session_service.h"
17 #include "components/sessions/core/session_command.h" 17 #include "components/sessions/core/session_command.h"
18 #include "components/sessions/core/sessions_export.h" 18 #include "components/sessions/core/sessions_export.h"
19 19
20 namespace base { 20 namespace base {
21 class File; 21 class File;
22 } 22 }
23 23
24 namespace sessions { 24 namespace sessions {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Returns the path to the current file. 124 // Returns the path to the current file.
125 base::FilePath GetCurrentSessionPath(); 125 base::FilePath GetCurrentSessionPath();
126 126
127 // Directory files are relative to. 127 // Directory files are relative to.
128 const base::FilePath path_to_dir_; 128 const base::FilePath path_to_dir_;
129 129
130 // Whether the previous target file is valid. 130 // Whether the previous target file is valid.
131 bool last_session_valid_; 131 bool last_session_valid_;
132 132
133 // Handle to the target file. 133 // Handle to the target file.
134 scoped_ptr<base::File> current_session_file_; 134 std::unique_ptr<base::File> current_session_file_;
135 135
136 // Whether we've inited. Remember, the constructor is run on the 136 // Whether we've inited. Remember, the constructor is run on the
137 // Main thread, all others on the IO thread, hence lazy initialization. 137 // Main thread, all others on the IO thread, hence lazy initialization.
138 bool inited_; 138 bool inited_;
139 139
140 // If true, the file is empty (no commands have been added to it). 140 // If true, the file is empty (no commands have been added to it).
141 bool empty_file_; 141 bool empty_file_;
142 142
143 DISALLOW_COPY_AND_ASSIGN(SessionBackend); 143 DISALLOW_COPY_AND_ASSIGN(SessionBackend);
144 }; 144 };
145 145
146 } // namespace sessions 146 } // namespace sessions
147 147
148 #endif // COMPONENTS_SESSIONS_CORE_SESSION_BACKEND_H_ 148 #endif // COMPONENTS_SESSIONS_CORE_SESSION_BACKEND_H_
OLDNEW
« no previous file with comments | « components/sessions/core/serialized_navigation_entry_unittest.cc ('k') | components/sessions/core/session_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698