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/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 if (!base::ReadFileToString(manifest_path, &manifest_data)) | 310 if (!base::ReadFileToString(manifest_path, &manifest_data)) |
311 return false; | 311 return false; |
312 scoped_ptr<base::Value> manifest_value( | 312 scoped_ptr<base::Value> manifest_value( |
313 base::JSONReader::Read(manifest_data, base::JSON_ALLOW_TRAILING_COMMAS)); | 313 base::JSONReader::Read(manifest_data, base::JSON_ALLOW_TRAILING_COMMAS)); |
314 if (!manifest_value.get()) | 314 if (!manifest_value.get()) |
315 return false; | 315 return false; |
316 base::DictionaryValue* manifest = NULL; | 316 base::DictionaryValue* manifest = NULL; |
317 if (!manifest_value->GetAsDictionary(&manifest)) | 317 if (!manifest_value->GetAsDictionary(&manifest)) |
318 return false; | 318 return false; |
319 | 319 |
320 Version version; | 320 base::Version version; |
321 if (!chrome::CheckPepperFlashManifest(*manifest, &version)) | 321 if (!chrome::CheckPepperFlashManifest(*manifest, &version)) |
322 return false; | 322 return false; |
323 | 323 |
324 *plugin = CreatePepperFlashInfo(flash_filename, version.GetString()); | 324 *plugin = CreatePepperFlashInfo(flash_filename, version.GetString()); |
325 return true; | 325 return true; |
326 } | 326 } |
327 #endif // defined(ENABLE_PLUGINS) | 327 #endif // defined(ENABLE_PLUGINS) |
328 | 328 |
329 std::string GetProduct() { | 329 std::string GetProduct() { |
330 return version_info::GetProductNameAndVersionForUserAgent(); | 330 return version_info::GetProductNameAndVersionForUserAgent(); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 schemes->insert(content::kChromeUIScheme); | 492 schemes->insert(content::kChromeUIScheme); |
493 schemes->insert(extensions::kExtensionScheme); | 493 schemes->insert(extensions::kExtensionScheme); |
494 schemes->insert(extensions::kExtensionResourceScheme); | 494 schemes->insert(extensions::kExtensionResourceScheme); |
495 GetSecureOriginWhitelist(origins); | 495 GetSecureOriginWhitelist(origins); |
496 } | 496 } |
497 | 497 |
498 void ChromeContentClient::AddServiceWorkerSchemes( | 498 void ChromeContentClient::AddServiceWorkerSchemes( |
499 std::set<std::string>* schemes) { | 499 std::set<std::string>* schemes) { |
500 schemes->insert(extensions::kExtensionScheme); | 500 schemes->insert(extensions::kExtensionScheme); |
501 } | 501 } |
OLD | NEW |