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

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

Issue 345023: Get rid of MessageLoop* caching in extensions code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/browser/profile.h" 5 #include "chrome/browser/profile.h"
6 6
7 #include "app/theme_provider.h" 7 #include "app/theme_provider.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 std::wstring path_string = 661 std::wstring path_string =
662 command_line->GetSwitchValue(switches::kUserScriptsDir); 662 command_line->GetSwitchValue(switches::kUserScriptsDir);
663 script_dir = FilePath::FromWStringHack(path_string); 663 script_dir = FilePath::FromWStringHack(path_string);
664 } else { 664 } else {
665 script_dir = GetPath(); 665 script_dir = GetPath();
666 script_dir = script_dir.Append(chrome::kUserScriptsDirname); 666 script_dir = script_dir.Append(chrome::kUserScriptsDirname);
667 } 667 }
668 } 668 }
669 669
670 ExtensionErrorReporter::Init(true); // allow noisy errors. 670 ExtensionErrorReporter::Init(true); // allow noisy errors.
671 user_script_master_ = new UserScriptMaster( 671 user_script_master_ = new UserScriptMaster(script_dir);
672 g_browser_process->file_thread()->message_loop(),
673 script_dir);
674 extensions_service_ = new ExtensionsService( 672 extensions_service_ = new ExtensionsService(
675 this, 673 this,
676 CommandLine::ForCurrentProcess(), 674 CommandLine::ForCurrentProcess(),
677 GetPrefs(), 675 GetPrefs(),
678 GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName), 676 GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName),
679 MessageLoop::current(),
680 g_browser_process->file_thread()->message_loop(),
681 true); 677 true);
682 678
683 extensions_service_->Init(); 679 extensions_service_->Init();
684 680
685 // Load any extensions specified with --load-extension. 681 // Load any extensions specified with --load-extension.
686 if (command_line->HasSwitch(switches::kLoadExtension)) { 682 if (command_line->HasSwitch(switches::kLoadExtension)) {
687 std::wstring path_string = 683 std::wstring path_string =
688 command_line->GetSwitchValue(switches::kLoadExtension); 684 command_line->GetSwitchValue(switches::kLoadExtension);
689 FilePath path = FilePath::FromWStringHack(path_string); 685 FilePath path = FilePath::FromWStringHack(path_string);
690 extensions_service_->LoadExtension(path); 686 extensions_service_->LoadExtension(path);
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 return sync_service_.get(); 1371 return sync_service_.get();
1376 } 1372 }
1377 #endif 1373 #endif
1378 return NULL; 1374 return NULL;
1379 } 1375 }
1380 1376
1381 void ProfileImpl::InitSyncService() { 1377 void ProfileImpl::InitSyncService() {
1382 sync_service_.reset(new ProfileSyncService(this)); 1378 sync_service_.reset(new ProfileSyncService(this));
1383 sync_service_->Initialize(); 1379 sync_service_->Initialize();
1384 } 1380 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/user_script_master_unittest.cc ('k') | chrome/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698