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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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 | Annotate | Revision Log
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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 1267
1268 // Extensions that are force-installed come from an update URL, which defaults 1268 // Extensions that are force-installed come from an update URL, which defaults
1269 // to the webstore. Use a mock URL for this test with an update manifest 1269 // to the webstore. Use a mock URL for this test with an update manifest
1270 // that includes "good.crx". 1270 // that includes "good.crx".
1271 base::FilePath path = 1271 base::FilePath path =
1272 base::FilePath(kTestExtensionsDir).Append(kGoodCrxManifestName); 1272 base::FilePath(kTestExtensionsDir).Append(kGoodCrxManifestName);
1273 GURL url(URLRequestMockHTTPJob::GetMockUrl(path)); 1273 GURL url(URLRequestMockHTTPJob::GetMockUrl(path));
1274 1274
1275 // Setting the forcelist extension should install "good.crx". 1275 // Setting the forcelist extension should install "good.crx".
1276 base::ListValue forcelist; 1276 base::ListValue forcelist;
1277 forcelist.Append(base::Value::CreateStringValue(StringPrintf( 1277 forcelist.Append(base::Value::CreateStringValue(base::StringPrintf(
1278 "%s;%s", kGoodCrxId, url.spec().c_str()))); 1278 "%s;%s", kGoodCrxId, url.spec().c_str())));
1279 PolicyMap policies; 1279 PolicyMap policies;
1280 policies.Set(key::kExtensionInstallForcelist, POLICY_LEVEL_MANDATORY, 1280 policies.Set(key::kExtensionInstallForcelist, POLICY_LEVEL_MANDATORY,
1281 POLICY_SCOPE_USER, forcelist.DeepCopy()); 1281 POLICY_SCOPE_USER, forcelist.DeepCopy());
1282 content::WindowedNotificationObserver observer( 1282 content::WindowedNotificationObserver observer(
1283 chrome::NOTIFICATION_EXTENSION_INSTALLED, 1283 chrome::NOTIFICATION_EXTENSION_INSTALLED,
1284 content::NotificationService::AllSources()); 1284 content::NotificationService::AllSources());
1285 UpdateProviderPolicy(policies); 1285 UpdateProviderPolicy(policies);
1286 observer.Wait(); 1286 observer.Wait();
1287 content::Details<const extensions::Extension> details = observer.details(); 1287 content::Details<const extensions::Extension> details = observer.details();
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 this)); 1944 this));
1945 1945
1946 MessageLoop::current()->Run(); 1946 MessageLoop::current()->Run();
1947 } 1947 }
1948 1948
1949 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, 1949 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance,
1950 MediaStreamDevicesControllerBrowserTest, 1950 MediaStreamDevicesControllerBrowserTest,
1951 testing::Bool()); 1951 testing::Bool());
1952 1952
1953 } // namespace policy 1953 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698