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

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

Issue 149619: Various minor extension fixes (Closed)
Patch Set: One more test Created 11 years, 5 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
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 script_dir); 561 script_dir);
562 extensions_service_ = new ExtensionsService( 562 extensions_service_ = new ExtensionsService(
563 this, 563 this,
564 CommandLine::ForCurrentProcess(), 564 CommandLine::ForCurrentProcess(),
565 GetPrefs(), 565 GetPrefs(),
566 GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName), 566 GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName),
567 MessageLoop::current(), 567 MessageLoop::current(),
568 g_browser_process->file_thread()->message_loop()); 568 g_browser_process->file_thread()->message_loop());
569 569
570 extensions_service_->Init(); 570 extensions_service_->Init();
571
572 // Load any extensions specified with --load-extension.
573 if (command_line->HasSwitch(switches::kLoadExtension)) {
Erik does not do reviews 2009/07/14 20:22:38 By moving the load into here, this means you can't
Aaron Boodman 2009/07/14 20:35:44 Hmm. No, not intentional. I moved the code here so
Erik does not do reviews 2009/07/14 20:46:39 Yep. I think it's fine like this.
574 std::wstring path_string =
575 command_line->GetSwitchValue(switches::kLoadExtension);
576 FilePath path = FilePath::FromWStringHack(path_string);
577 extensions_service_->LoadExtension(path);
578
579 // Tell UserScriptMaser to watch this extension's directory for changes so
580 // you can live edit content scripts during development.
581 user_script_master_->AddWatchedPath(path);
582 }
571 } 583 }
572 584
573 void ProfileImpl::InitWebResources() { 585 void ProfileImpl::InitWebResources() {
574 web_resource_service_ = new WebResourceService( 586 web_resource_service_ = new WebResourceService(
575 this, 587 this,
576 g_browser_process->file_thread()->message_loop()); 588 g_browser_process->file_thread()->message_loop());
577 589
578 web_resource_service_->StartAfterDelay(); 590 web_resource_service_->StartAfterDelay();
579 } 591 }
580 592
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 1165
1154 void ProfileImpl::StopCreateSessionServiceTimer() { 1166 void ProfileImpl::StopCreateSessionServiceTimer() {
1155 create_session_service_timer_.Stop(); 1167 create_session_service_timer_.Stop();
1156 } 1168 }
1157 1169
1158 #ifdef CHROME_PERSONALIZATION 1170 #ifdef CHROME_PERSONALIZATION
1159 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() { 1171 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() {
1160 return personalization_.get(); 1172 return personalization_.get();
1161 } 1173 }
1162 #endif 1174 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698