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

Side by Side Diff: chrome/browser/background/background_application_list_model_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
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_policy_provider_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // TODO(rickcam): Bug 73183: Add unit tests for image loading 5 // TODO(rickcam): Bug 73183: Add unit tests for image loading
6 6
7 #include "chrome/browser/background/background_application_list_model.h" 7 #include "chrome/browser/background/background_application_list_model.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // |background_permission| is true. 76 // |background_permission| is true.
77 static scoped_refptr<Extension> CreateExtension( 77 static scoped_refptr<Extension> CreateExtension(
78 const std::string& name, 78 const std::string& name,
79 bool background_permission) { 79 bool background_permission) {
80 base::DictionaryValue manifest; 80 base::DictionaryValue manifest;
81 manifest.SetString(extensions::manifest_keys::kVersion, "1.0.0.0"); 81 manifest.SetString(extensions::manifest_keys::kVersion, "1.0.0.0");
82 manifest.SetString(extensions::manifest_keys::kName, name); 82 manifest.SetString(extensions::manifest_keys::kName, name);
83 base::ListValue* permissions = new base::ListValue(); 83 base::ListValue* permissions = new base::ListValue();
84 manifest.Set(extensions::manifest_keys::kPermissions, permissions); 84 manifest.Set(extensions::manifest_keys::kPermissions, permissions);
85 if (background_permission) { 85 if (background_permission) {
86 permissions->Append(new base::StringValue("background")); 86 permissions->AppendString("background");
87 } 87 }
88 88
89 std::string error; 89 std::string error;
90 scoped_refptr<Extension> extension; 90 scoped_refptr<Extension> extension;
91 91
92 extension = Extension::Create( 92 extension = Extension::Create(
93 bogus_file_pathname(name), 93 bogus_file_pathname(name),
94 extensions::Manifest::INVALID_LOCATION, 94 extensions::Manifest::INVALID_LOCATION,
95 manifest, 95 manifest,
96 Extension::NO_FLAGS, 96 Extension::NO_FLAGS,
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 case 2: 395 case 2:
396 TogglePermission(service(), &extensions, model.get(), &expected, 396 TogglePermission(service(), &extensions, model.get(), &expected,
397 &count); 397 &count);
398 break; 398 break;
399 default: 399 default:
400 NOTREACHED(); 400 NOTREACHED();
401 break; 401 break;
402 } 402 }
403 } 403 }
404 } 404 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_policy_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698