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

Side by Side Diff: chrome/browser/ui/webui/sync_file_system_internals/file_metadata_handler.cc

Issue 294893005: [SyncFS] Make GetOriginStatusMap asynchronous (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactoring Created 6 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/sync_file_system_internals/file_metadata_handl er.h" 5 #include "chrome/browser/ui/webui/sync_file_system_internals/file_metadata_handl er.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 SyncFileSystemServiceFactory::GetForProfile(profile_); 60 SyncFileSystemServiceFactory::GetForProfile(profile_);
61 if (!sync_service) 61 if (!sync_service)
62 return; 62 return;
63 sync_service->DumpFiles(origin, 63 sync_service->DumpFiles(origin,
64 base::Bind(&FileMetadataHandler::DidGetFileMetadata, 64 base::Bind(&FileMetadataHandler::DidGetFileMetadata,
65 weak_factory_.GetWeakPtr())); 65 weak_factory_.GetWeakPtr()));
66 } 66 }
67 67
68 void FileMetadataHandler::GetExtensions(const base::ListValue* args) { 68 void FileMetadataHandler::GetExtensions(const base::ListValue* args) {
69 DCHECK(args); 69 DCHECK(args);
70 base::ListValue list; 70 ExtensionStatusesHandler::GetExtensionStatusesAsDictionary(
71 ExtensionStatusesHandler::GetExtensionStatusesAsDictionary(profile_, &list); 71 profile_,
72 base::Bind(&FileMetadataHandler::DidGetExtensions,
73 weak_factory_.GetWeakPtr()));
74 }
75
76 void FileMetadataHandler::DidGetExtensions(const base::ListValue& list) {
72 web_ui()->CallJavascriptFunction("FileMetadata.onGetExtensions", list); 77 web_ui()->CallJavascriptFunction("FileMetadata.onGetExtensions", list);
73 } 78 }
74 79
75 void FileMetadataHandler::DidGetFileMetadata(const base::ListValue& files) { 80 void FileMetadataHandler::DidGetFileMetadata(const base::ListValue& files) {
76 web_ui()->CallJavascriptFunction("FileMetadata.onGetFileMetadata", files); 81 web_ui()->CallJavascriptFunction("FileMetadata.onGetFileMetadata", files);
77 } 82 }
78 83
79 } // namespace syncfs_internals 84 } // namespace syncfs_internals
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698