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

Side by Side Diff: chrome/browser/importer/firefox_importer_browsertest.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 // Deletes itself. 270 // Deletes itself.
271 // TODO(gab): Use ExternalProcessImporterHost on Linux as well. 271 // TODO(gab): Use ExternalProcessImporterHost on Linux as well.
272 ImporterHost* host; 272 ImporterHost* host;
273 #if defined(OS_MACOSX) || defined(OS_WIN) 273 #if defined(OS_MACOSX) || defined(OS_WIN)
274 host = new ExternalProcessImporterHost; 274 host = new ExternalProcessImporterHost;
275 #else 275 #else
276 host = new ImporterHost; 276 host = new ImporterHost;
277 #endif 277 #endif
278 host->SetObserver(observer); 278 host->SetObserver(observer);
279 host->StartImportSettings(source_profile, browser()->profile(), 279 host->StartImportSettings(source_profile,
280 items, make_scoped_refptr(writer)); 280 browser()->profile(),
281 items,
282 make_scoped_refptr(writer).get());
281 base::MessageLoop::current()->Run(); 283 base::MessageLoop::current()->Run();
282 } 284 }
283 285
284 base::ScopedTempDir temp_dir_; 286 base::ScopedTempDir temp_dir_;
285 base::FilePath profile_path_; 287 base::FilePath profile_path_;
286 base::FilePath app_path_; 288 base::FilePath app_path_;
287 }; 289 };
288 290
289 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, 291 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest,
290 MAYBE_IMPORTER(Firefox30Importer)) { 292 MAYBE_IMPORTER(Firefox30Importer)) {
291 scoped_refptr<Firefox3Observer> observer(new Firefox3Observer()); 293 scoped_refptr<Firefox3Observer> observer(new Firefox3Observer());
292 Firefox3xImporterBrowserTest("firefox3_profile", observer.get(), 294 Firefox3xImporterBrowserTest("firefox3_profile", observer.get(),
293 observer.get(), true); 295 observer.get(), true);
294 } 296 }
295 297
296 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, 298 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest,
297 MAYBE_IMPORTER(Firefox35Importer)) { 299 MAYBE_IMPORTER(Firefox35Importer)) {
298 bool import_search_engines = false; 300 bool import_search_engines = false;
299 scoped_refptr<Firefox3Observer> observer( 301 scoped_refptr<Firefox3Observer> observer(
300 new Firefox3Observer(import_search_engines)); 302 new Firefox3Observer(import_search_engines));
301 Firefox3xImporterBrowserTest("firefox35_profile", observer.get(), 303 Firefox3xImporterBrowserTest("firefox35_profile", observer.get(),
302 observer.get(), import_search_engines); 304 observer.get(), import_search_engines);
303 } 305 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/external_process_importer_client.cc ('k') | chrome/browser/managed_mode/managed_user_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698