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

Side by Side Diff: chrome/browser/chrome_plugin_browsertest.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 base::Bind(&GetPluginsInfoCallback, &plugins, runner->QuitClosure())); 120 base::Bind(&GetPluginsInfoCallback, &plugins, runner->QuitClosure()));
121 runner->Run(); 121 runner->Run();
122 return plugins; 122 return plugins;
123 } 123 }
124 124
125 static void EnableFlash(bool enable, Profile* profile) { 125 static void EnableFlash(bool enable, Profile* profile) {
126 std::vector<FilePath> paths; 126 std::vector<FilePath> paths;
127 GetFlashPath(&paths); 127 GetFlashPath(&paths);
128 ASSERT_FALSE(paths.empty()); 128 ASSERT_FALSE(paths.empty());
129 129
130 PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile); 130 PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile).get();
131 scoped_refptr<content::MessageLoopRunner> runner = 131 scoped_refptr<content::MessageLoopRunner> runner =
132 new content::MessageLoopRunner; 132 new content::MessageLoopRunner;
133 scoped_refptr<CallbackBarrier> callback_barrier( 133 scoped_refptr<CallbackBarrier> callback_barrier(
134 new CallbackBarrier(runner->QuitClosure())); 134 new CallbackBarrier(runner->QuitClosure()));
135 for (std::vector<FilePath>::iterator iter = paths.begin(); 135 for (std::vector<FilePath>::iterator iter = paths.begin();
136 iter != paths.end(); ++iter) { 136 iter != paths.end(); ++iter) {
137 plugin_prefs->EnablePlugin(enable, *iter, 137 plugin_prefs->EnablePlugin(enable, *iter,
138 callback_barrier->CreateCallback()); 138 callback_barrier->CreateCallback());
139 } 139 }
140 runner->Run(); 140 runner->Run();
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 std::vector<webkit::WebPluginInfo> plugins = GetPlugins(); 253 std::vector<webkit::WebPluginInfo> plugins = GetPlugins();
254 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected); ++i) { 254 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected); ++i) {
255 size_t j = 0; 255 size_t j = 0;
256 for (; j < plugins.size(); ++j) { 256 for (; j < plugins.size(); ++j) {
257 if (plugins[j].name == ASCIIToUTF16(expected[i])) 257 if (plugins[j].name == ASCIIToUTF16(expected[i]))
258 break; 258 break;
259 } 259 }
260 ASSERT_TRUE(j != plugins.size()) << "Didn't find " << expected[i]; 260 ASSERT_TRUE(j != plugins.size()) << "Didn't find " << expected[i];
261 } 261 }
262 } 262 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/content_settings/content_settings_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698