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

Side by Side Diff: chrome/browser/chromeos/drive/drive_system_service.cc

Issue 13866009: Remove root resource id aliasing from DriveResourceMetadata. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove other resource id check. Created 7 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 | Annotate | Revision Log
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 "chrome/browser/chromeos/drive/drive_system_service.h" 5 #include "chrome/browser/chromeos/drive/drive_system_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 129 }
130 cache_.reset(new DriveCache(!test_cache_root.empty() ? test_cache_root : 130 cache_.reset(new DriveCache(!test_cache_root.empty() ? test_cache_root :
131 DriveCache::GetCacheRootPath(profile), 131 DriveCache::GetCacheRootPath(profile),
132 blocking_task_runner_, 132 blocking_task_runner_,
133 NULL /* free_disk_space_getter */)); 133 NULL /* free_disk_space_getter */));
134 webapps_registry_.reset(new DriveWebAppsRegistry); 134 webapps_registry_.reset(new DriveWebAppsRegistry);
135 135
136 // We can call DriveCache::GetCacheDirectoryPath safely even before the cache 136 // We can call DriveCache::GetCacheDirectoryPath safely even before the cache
137 // gets initialized. 137 // gets initialized.
138 resource_metadata_.reset(new DriveResourceMetadata( 138 resource_metadata_.reset(new DriveResourceMetadata(
139 drive_service_->GetRootResourceId(),
140 cache_->GetCacheDirectoryPath(DriveCache::CACHE_TYPE_META), 139 cache_->GetCacheDirectoryPath(DriveCache::CACHE_TYPE_META),
141 blocking_task_runner_)); 140 blocking_task_runner_));
142 141
143 file_system_.reset(test_file_system ? test_file_system : 142 file_system_.reset(test_file_system ? test_file_system :
144 new DriveFileSystem(profile_, 143 new DriveFileSystem(profile_,
145 cache(), 144 cache(),
146 drive_service_.get(), 145 drive_service_.get(),
147 webapps_registry(), 146 webapps_registry(),
148 resource_metadata_.get(), 147 resource_metadata_.get(),
149 blocking_task_runner_)); 148 blocking_task_runner_));
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 if (factory_for_test_.is_null()) 456 if (factory_for_test_.is_null())
458 service = new DriveSystemService(profile, NULL, base::FilePath(), NULL); 457 service = new DriveSystemService(profile, NULL, base::FilePath(), NULL);
459 else 458 else
460 service = factory_for_test_.Run(profile); 459 service = factory_for_test_.Run(profile);
461 460
462 service->Initialize(); 461 service->Initialize();
463 return service; 462 return service;
464 } 463 }
465 464
466 } // namespace drive 465 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698