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

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

Issue 17249004: drive: Use ResourceMetadataStorage from FileCache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More precise old DB handling Created 7 years, 6 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_integration_service.h" 5 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 drive_service_.reset(new GDataWapiService( 163 drive_service_.reset(new GDataWapiService(
164 g_browser_process->system_request_context(), 164 g_browser_process->system_request_context(),
165 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction), 165 GURL(google_apis::GDataWapiUrlGenerator::kBaseUrlForProduction),
166 GetDriveUserAgent())); 166 GetDriveUserAgent()));
167 } 167 }
168 scheduler_.reset(new JobScheduler(profile_, drive_service_.get())); 168 scheduler_.reset(new JobScheduler(profile_, drive_service_.get()));
169 metadata_storage_.reset(new internal::ResourceMetadataStorage( 169 metadata_storage_.reset(new internal::ResourceMetadataStorage(
170 cache_root_directory_.Append(util::kMetadataDirectory), 170 cache_root_directory_.Append(util::kMetadataDirectory),
171 blocking_task_runner_.get())); 171 blocking_task_runner_.get()));
172 cache_.reset(new internal::FileCache( 172 cache_.reset(new internal::FileCache(
173 cache_root_directory_.Append(util::kMetadataDirectory), 173 metadata_storage_.get(),
174 cache_root_directory_.Append(util::kCacheFileDirectory), 174 cache_root_directory_.Append(util::kCacheFileDirectory),
175 blocking_task_runner_.get(), 175 blocking_task_runner_.get(),
176 NULL /* free_disk_space_getter */)); 176 NULL /* free_disk_space_getter */));
177 drive_app_registry_.reset(new DriveAppRegistry(scheduler_.get())); 177 drive_app_registry_.reset(new DriveAppRegistry(scheduler_.get()));
178 178
179 resource_metadata_.reset(new internal::ResourceMetadata( 179 resource_metadata_.reset(new internal::ResourceMetadata(
180 metadata_storage_.get(), blocking_task_runner_)); 180 metadata_storage_.get(), blocking_task_runner_));
181 181
182 file_system_.reset( 182 file_system_.reset(
183 test_file_system ? test_file_system : new FileSystem( 183 test_file_system ? test_file_system : new FileSystem(
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 profile, NULL, base::FilePath(), NULL); 467 profile, NULL, base::FilePath(), NULL);
468 } else { 468 } else {
469 service = factory_for_test_.Run(profile); 469 service = factory_for_test_.Run(profile);
470 } 470 }
471 471
472 service->Initialize(); 472 service->Initialize();
473 return service; 473 return service;
474 } 474 }
475 475
476 } // namespace drive 476 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/change_list_loader_unittest.cc ('k') | chrome/browser/chromeos/drive/file_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698