Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: chrome/renderer/chrome_content_renderer_client_unittest.cc

Issue 2030013003: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/permissions/permission_set_unittest.cc ('k') | chrome/test/chromedriver/window_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698