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

Side by Side Diff: components/drive/service/fake_drive_service.cc

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 "components/drive/service/fake_drive_service.h" 5 #include "components/drive/service/fake_drive_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 bool FakeDriveService::LoadAppListForDriveApi( 256 bool FakeDriveService::LoadAppListForDriveApi(
257 const std::string& relative_path) { 257 const std::string& relative_path) {
258 DCHECK(thread_checker_.CalledOnValidThread()); 258 DCHECK(thread_checker_.CalledOnValidThread());
259 259
260 // Load JSON data, which must be a dictionary. 260 // Load JSON data, which must be a dictionary.
261 scoped_ptr<base::Value> value = test_util::LoadJSONFile(relative_path); 261 scoped_ptr<base::Value> value = test_util::LoadJSONFile(relative_path);
262 CHECK_EQ(base::Value::TYPE_DICTIONARY, value->GetType()); 262 CHECK_EQ(base::Value::TYPE_DICTIONARY, value->GetType());
263 app_info_value_.reset( 263 app_info_value_.reset(
264 static_cast<base::DictionaryValue*>(value.release())); 264 static_cast<base::DictionaryValue*>(value.release()));
265 return app_info_value_; 265 return !!app_info_value_;
266 } 266 }
267 267
268 void FakeDriveService::AddApp(const std::string& app_id, 268 void FakeDriveService::AddApp(const std::string& app_id,
269 const std::string& app_name, 269 const std::string& app_name,
270 const std::string& product_id, 270 const std::string& product_id,
271 const std::string& create_url, 271 const std::string& create_url,
272 bool is_removable) { 272 bool is_removable) {
273 if (app_json_template_.empty()) { 273 if (app_json_template_.empty()) {
274 base::FilePath path = 274 base::FilePath path =
275 test_util::GetTestFilePath("drive/applist_app_template.json"); 275 test_util::GetTestFilePath("drive/applist_app_template.json");
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 1814
1815 NOTREACHED(); 1815 NOTREACHED();
1816 return scoped_ptr<BatchRequestConfiguratorInterface>(); 1816 return scoped_ptr<BatchRequestConfiguratorInterface>();
1817 } 1817 }
1818 1818
1819 void FakeDriveService::NotifyObservers() { 1819 void FakeDriveService::NotifyObservers() {
1820 FOR_EACH_OBSERVER(ChangeObserver, change_observers_, OnNewChangeAvailable()); 1820 FOR_EACH_OBSERVER(ChangeObserver, change_observers_, OnNewChangeAvailable());
1821 } 1821 }
1822 1822
1823 } // namespace drive 1823 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698