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/extensions/install_signer.h" | 5 #include "chrome/browser/extensions/install_signer.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 return verifier.VerifyFinal(); | 267 return verifier.VerifyFinal(); |
268 } | 268 } |
269 | 269 |
270 | 270 |
271 class InstallSigner::FetcherDelegate : public net::URLFetcherDelegate { | 271 class InstallSigner::FetcherDelegate : public net::URLFetcherDelegate { |
272 public: | 272 public: |
273 explicit FetcherDelegate(const base::Closure& callback) | 273 explicit FetcherDelegate(const base::Closure& callback) |
274 : callback_(callback) { | 274 : callback_(callback) { |
275 } | 275 } |
276 | 276 |
277 virtual ~FetcherDelegate() { | 277 ~FetcherDelegate() override {} |
278 } | |
279 | 278 |
280 virtual void OnURLFetchComplete(const net::URLFetcher* source) override { | 279 void OnURLFetchComplete(const net::URLFetcher* source) override { |
281 callback_.Run(); | 280 callback_.Run(); |
282 } | 281 } |
283 | 282 |
284 private: | 283 private: |
285 base::Closure callback_; | 284 base::Closure callback_; |
286 DISALLOW_COPY_AND_ASSIGN(FetcherDelegate); | 285 DISALLOW_COPY_AND_ASSIGN(FetcherDelegate); |
287 }; | 286 }; |
288 | 287 |
289 // static | 288 // static |
290 ExtensionIdSet InstallSigner::GetForcedNotFromWebstore() { | 289 ExtensionIdSet InstallSigner::GetForcedNotFromWebstore() { |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 if (!verified) | 500 if (!verified) |
502 result.reset(); | 501 result.reset(); |
503 } | 502 } |
504 | 503 |
505 if (!callback_.is_null()) | 504 if (!callback_.is_null()) |
506 callback_.Run(result.Pass()); | 505 callback_.Run(result.Pass()); |
507 } | 506 } |
508 | 507 |
509 | 508 |
510 } // namespace extensions | 509 } // namespace extensions |
OLD | NEW |