OLD | NEW |
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 void FileMetadataHandler::GetExtensions(const base::ListValue* args) { | 67 void FileMetadataHandler::GetExtensions(const base::ListValue* args) { |
68 DCHECK(args); | 68 DCHECK(args); |
69 ExtensionStatusesHandler::GetExtensionStatusesAsDictionary( | 69 ExtensionStatusesHandler::GetExtensionStatusesAsDictionary( |
70 profile_, | 70 profile_, |
71 base::Bind(&FileMetadataHandler::DidGetExtensions, | 71 base::Bind(&FileMetadataHandler::DidGetExtensions, |
72 weak_factory_.GetWeakPtr())); | 72 weak_factory_.GetWeakPtr())); |
73 } | 73 } |
74 | 74 |
75 void FileMetadataHandler::DidGetExtensions(const base::ListValue& list) { | 75 void FileMetadataHandler::DidGetExtensions(const base::ListValue& list) { |
76 web_ui()->CallJavascriptFunction("FileMetadata.onGetExtensions", list); | 76 web_ui()->CallJavascriptFunctionUnsafe("FileMetadata.onGetExtensions", list); |
77 } | 77 } |
78 | 78 |
79 void FileMetadataHandler::DidGetFileMetadata(const base::ListValue& files) { | 79 void FileMetadataHandler::DidGetFileMetadata(const base::ListValue& files) { |
80 web_ui()->CallJavascriptFunction("FileMetadata.onGetFileMetadata", files); | 80 web_ui()->CallJavascriptFunctionUnsafe("FileMetadata.onGetFileMetadata", |
| 81 files); |
81 } | 82 } |
82 | 83 |
83 } // namespace syncfs_internals | 84 } // namespace syncfs_internals |
OLD | NEW |