| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/test/testing_profile.h" | 5 #include "chrome/test/testing_profile.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 | 337 |
| 338 void TestingProfile::UseThemeProvider(BrowserThemeProvider* theme_provider) { | 338 void TestingProfile::UseThemeProvider(BrowserThemeProvider* theme_provider) { |
| 339 theme_provider->Init(this); | 339 theme_provider->Init(this); |
| 340 created_theme_provider_ = true; | 340 created_theme_provider_ = true; |
| 341 theme_provider_.reset(theme_provider); | 341 theme_provider_.reset(theme_provider); |
| 342 } | 342 } |
| 343 | 343 |
| 344 scoped_refptr<ExtensionsService> TestingProfile::CreateExtensionsService( | 344 scoped_refptr<ExtensionsService> TestingProfile::CreateExtensionsService( |
| 345 const CommandLine* command_line, | 345 const CommandLine* command_line, |
| 346 const FilePath& install_directory) { | 346 const FilePath& install_directory) { |
| 347 ExtensionPrefs* extension_prefs = new ExtensionPrefs( |
| 348 GetPrefs(), |
| 349 install_directory); |
| 347 extensions_service_ = new ExtensionsService(this, | 350 extensions_service_ = new ExtensionsService(this, |
| 348 command_line, | 351 command_line, |
| 349 install_directory, | 352 install_directory, |
| 353 extension_prefs, |
| 350 false); | 354 false); |
| 351 return extensions_service_; | 355 return extensions_service_; |
| 352 } | 356 } |
| 353 | 357 |
| 354 FilePath TestingProfile::GetPath() { | 358 FilePath TestingProfile::GetPath() { |
| 355 DCHECK(temp_dir_.IsValid()); // TODO(phajdan.jr): do it better. | 359 DCHECK(temp_dir_.IsValid()); // TODO(phajdan.jr): do it better. |
| 356 return temp_dir_.path(); | 360 return temp_dir_.path(); |
| 357 } | 361 } |
| 358 | 362 |
| 359 TestingPrefService* TestingProfile::GetTestingPrefService() { | 363 TestingPrefService* TestingProfile::GetTestingPrefService() { |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 } | 524 } |
| 521 return profile_sync_service_.get(); | 525 return profile_sync_service_.get(); |
| 522 } | 526 } |
| 523 | 527 |
| 524 void TestingProfile::DestroyWebDataService() { | 528 void TestingProfile::DestroyWebDataService() { |
| 525 if (!web_data_service_.get()) | 529 if (!web_data_service_.get()) |
| 526 return; | 530 return; |
| 527 | 531 |
| 528 web_data_service_->Shutdown(); | 532 web_data_service_->Shutdown(); |
| 529 } | 533 } |
| OLD | NEW |