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

Side by Side Diff: chrome/browser/ui/webui/chromeos/drive_internals_ui.cc

Issue 10873005: Rename GDataDirectoryService to DriveResourceMetadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase. Created 8 years, 4 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/ui/webui/chromeos/drive_internals_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/drive_internals_ui.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/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 web_ui()->CallJavascriptFunction("updateGCacheContents", 273 web_ui()->CallJavascriptFunction("updateGCacheContents",
274 *gcache_contents, 274 *gcache_contents,
275 *gcache_summary); 275 *gcache_summary);
276 276
277 // Start updating the file system tree section, if we have access token. 277 // Start updating the file system tree section, if we have access token.
278 gdata::GDataSystemService* system_service = GetSystemService(); 278 gdata::GDataSystemService* system_service = GetSystemService();
279 if (!system_service->drive_service()->HasAccessToken()) 279 if (!system_service->drive_service()->HasAccessToken())
280 return; 280 return;
281 281
282 // Start rendering the file system tree as text. 282 // Start rendering the file system tree as text.
283 const FilePath root_path = FilePath(gdata::kGDataRootDirectory); 283 const FilePath root_path = FilePath(gdata::kDriveRootDirectory);
284 ++num_pending_reads_; 284 ++num_pending_reads_;
285 system_service->file_system()->ReadDirectoryByPath( 285 system_service->file_system()->ReadDirectoryByPath(
286 root_path, 286 root_path,
287 base::Bind(&DriveInternalsWebUIHandler::OnReadDirectoryByPath, 287 base::Bind(&DriveInternalsWebUIHandler::OnReadDirectoryByPath,
288 weak_ptr_factory_.GetWeakPtr(), 288 weak_ptr_factory_.GetWeakPtr(),
289 root_path)); 289 root_path));
290 } 290 }
291 291
292 void DriveInternalsWebUIHandler::OnReadDirectoryByPath( 292 void DriveInternalsWebUIHandler::OnReadDirectoryByPath(
293 const FilePath& parent_path, 293 const FilePath& parent_path,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 new ChromeWebUIDataSource(chrome::kChromeUIDriveInternalsHost); 386 new ChromeWebUIDataSource(chrome::kChromeUIDriveInternalsHost);
387 source->add_resource_path("drive_internals.css", IDR_DRIVE_INTERNALS_CSS); 387 source->add_resource_path("drive_internals.css", IDR_DRIVE_INTERNALS_CSS);
388 source->add_resource_path("drive_internals.js", IDR_DRIVE_INTERNALS_JS); 388 source->add_resource_path("drive_internals.js", IDR_DRIVE_INTERNALS_JS);
389 source->set_default_resource(IDR_DRIVE_INTERNALS_HTML); 389 source->set_default_resource(IDR_DRIVE_INTERNALS_HTML);
390 390
391 Profile* profile = Profile::FromWebUI(web_ui); 391 Profile* profile = Profile::FromWebUI(web_ui);
392 ChromeURLDataManager::AddDataSource(profile, source); 392 ChromeURLDataManager::AddDataSource(profile, source);
393 } 393 }
394 394
395 } // namespace chromeos 395 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.cc ('k') | chrome/browser/ui/webui/screenshot_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698