| 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/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 int flags = is_from_webstore ? | 103 int flags = is_from_webstore ? |
| 104 extensions::Extension::FROM_WEBSTORE: | 104 extensions::Extension::FROM_WEBSTORE: |
| 105 extensions::Extension::NO_FLAGS; | 105 extensions::Extension::NO_FLAGS; |
| 106 | 106 |
| 107 base::DictionaryValue manifest; | 107 base::DictionaryValue manifest; |
| 108 manifest.SetString("name", "NaCl Extension"); | 108 manifest.SetString("name", "NaCl Extension"); |
| 109 manifest.SetString("version", "1"); | 109 manifest.SetString("version", "1"); |
| 110 manifest.SetInteger("manifest_version", 2); | 110 manifest.SetInteger("manifest_version", 2); |
| 111 if (is_hosted_app) { | 111 if (is_hosted_app) { |
| 112 base::ListValue* url_list = new base::ListValue(); | 112 base::ListValue* url_list = new base::ListValue(); |
| 113 url_list->Append(new base::StringValue(app_url)); | 113 url_list->AppendString(app_url); |
| 114 manifest.Set(extensions::manifest_keys::kWebURLs, url_list); | 114 manifest.Set(extensions::manifest_keys::kWebURLs, url_list); |
| 115 manifest.SetString(extensions::manifest_keys::kLaunchWebURL, app_url); | 115 manifest.SetString(extensions::manifest_keys::kLaunchWebURL, app_url); |
| 116 } | 116 } |
| 117 std::string error; | 117 std::string error; |
| 118 return extensions::Extension::Create(base::FilePath(), location, manifest, | 118 return extensions::Extension::Create(base::FilePath(), location, manifest, |
| 119 flags, &error); | 119 flags, &error); |
| 120 } | 120 } |
| 121 | 121 |
| 122 scoped_refptr<const extensions::Extension> CreateExtension( | 122 scoped_refptr<const extensions::Extension> CreateExtension( |
| 123 bool is_from_webstore) { | 123 bool is_from_webstore) { |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 ChromeContentRendererClient client; | 401 ChromeContentRendererClient client; |
| 402 SearchBouncer::GetInstance()->OnSetSearchURLs( | 402 SearchBouncer::GetInstance()->OnSetSearchURLs( |
| 403 std::vector<GURL>(), GURL("http://example.com/n")); | 403 std::vector<GURL>(), GURL("http://example.com/n")); |
| 404 EXPECT_FALSE(client.ShouldSuppressErrorPage(nullptr, | 404 EXPECT_FALSE(client.ShouldSuppressErrorPage(nullptr, |
| 405 GURL("http://example.com"))); | 405 GURL("http://example.com"))); |
| 406 EXPECT_TRUE(client.ShouldSuppressErrorPage(nullptr, | 406 EXPECT_TRUE(client.ShouldSuppressErrorPage(nullptr, |
| 407 GURL("http://example.com/n"))); | 407 GURL("http://example.com/n"))); |
| 408 SearchBouncer::GetInstance()->OnSetSearchURLs( | 408 SearchBouncer::GetInstance()->OnSetSearchURLs( |
| 409 std::vector<GURL>(), GURL::EmptyGURL()); | 409 std::vector<GURL>(), GURL::EmptyGURL()); |
| 410 } | 410 } |
| OLD | NEW |