OLD | NEW |
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/options2/certificate_manager_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/certificate_manager_handler2.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/file_util.h" // for FileAccessProvider | 9 #include "base/file_util.h" // for FileAccessProvider |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 Handle StartRead(const FilePath& path, | 168 Handle StartRead(const FilePath& path, |
169 CancelableRequestConsumerBase* consumer, | 169 CancelableRequestConsumerBase* consumer, |
170 const ReadCallback& callback); | 170 const ReadCallback& callback); |
171 Handle StartWrite(const FilePath& path, | 171 Handle StartWrite(const FilePath& path, |
172 const std::string& data, | 172 const std::string& data, |
173 CancelableRequestConsumerBase* consumer, | 173 CancelableRequestConsumerBase* consumer, |
174 const WriteCallback& callback); | 174 const WriteCallback& callback); |
175 | 175 |
176 private: | 176 private: |
| 177 friend class base::RefCountedThreadSafe<FileAccessProvider>; |
| 178 virtual ~FileAccessProvider() {} |
| 179 |
177 void DoRead(scoped_refptr<CancelableRequest<ReadCallback> > request, | 180 void DoRead(scoped_refptr<CancelableRequest<ReadCallback> > request, |
178 FilePath path); | 181 FilePath path); |
179 void DoWrite(scoped_refptr<CancelableRequest<WriteCallback> > request, | 182 void DoWrite(scoped_refptr<CancelableRequest<WriteCallback> > request, |
180 FilePath path, | 183 FilePath path, |
181 std::string data); | 184 std::string data); |
182 }; | 185 }; |
183 | 186 |
184 CancelableRequestProvider::Handle FileAccessProvider::StartRead( | 187 CancelableRequestProvider::Handle FileAccessProvider::StartRead( |
185 const FilePath& path, | 188 const FilePath& path, |
186 CancelableRequestConsumerBase* consumer, | 189 CancelableRequestConsumerBase* consumer, |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", | 1050 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", |
1048 ready); | 1051 ready); |
1049 } | 1052 } |
1050 #endif | 1053 #endif |
1051 | 1054 |
1052 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { | 1055 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { |
1053 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); | 1056 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); |
1054 } | 1057 } |
1055 | 1058 |
1056 } // namespace options2 | 1059 } // namespace options2 |
OLD | NEW |