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

Side by Side Diff: chrome/browser/extensions/activity_log/activity_database_unittest.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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 (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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 statement.BindString(0, api_name_pattern); 159 statement.BindString(0, api_name_pattern);
160 if (!statement.Step()) 160 if (!statement.Step())
161 return -1; 161 return -1;
162 return statement.ColumnInt(0); 162 return statement.ColumnInt(0);
163 } 163 }
164 164
165 private: 165 private:
166 #if defined OS_CHROMEOS 166 #if defined OS_CHROMEOS
167 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; 167 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_;
168 chromeos::ScopedTestCrosSettings test_cros_settings_; 168 chromeos::ScopedTestCrosSettings test_cros_settings_;
169 scoped_ptr<chromeos::ScopedTestUserManager> test_user_manager_; 169 std::unique_ptr<chromeos::ScopedTestUserManager> test_user_manager_;
170 #endif 170 #endif
171 171
172 ActivityDatabaseTestPolicy* db_delegate_; 172 ActivityDatabaseTestPolicy* db_delegate_;
173 }; 173 };
174 174
175 // Check that the database is initialized properly. 175 // Check that the database is initialized properly.
176 TEST_F(ActivityDatabaseTest, Init) { 176 TEST_F(ActivityDatabaseTest, Init) {
177 base::ScopedTempDir temp_dir; 177 base::ScopedTempDir temp_dir;
178 base::FilePath db_file; 178 base::FilePath db_file;
179 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 179 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 ActivityDatabaseTestPolicy* delegate = new ActivityDatabaseTestPolicy(); 281 ActivityDatabaseTestPolicy* delegate = new ActivityDatabaseTestPolicy();
282 ActivityDatabase* activity_db = new ActivityDatabase(delegate); 282 ActivityDatabase* activity_db = new ActivityDatabase(delegate);
283 scoped_refptr<Action> action = new Action( 283 scoped_refptr<Action> action = new Action(
284 "punky", base::Time::Now(), Action::ACTION_API_CALL, "brewster"); 284 "punky", base::Time::Now(), Action::ACTION_API_CALL, "brewster");
285 action->mutable_args()->AppendString("woof"); 285 action->mutable_args()->AppendString("woof");
286 delegate->Record(activity_db, action); 286 delegate->Record(activity_db, action);
287 activity_db->Close(); 287 activity_db->Close();
288 } 288 }
289 289
290 } // namespace extensions 290 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/activity_log/activity_actions.cc ('k') | chrome/browser/extensions/activity_log/activity_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698