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

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

Issue 4200005: Part 4/4 of immutable Extension refactor: Kill Extension::StaticData and put (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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) 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/browser/profile_impl.h" 5 #include "chrome/browser/profile_impl.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 this, cookie_path); 771 this, cookie_path);
772 } 772 }
773 773
774 return extensions_request_context_; 774 return extensions_request_context_;
775 } 775 }
776 776
777 void ProfileImpl::RegisterExtensionWithRequestContexts( 777 void ProfileImpl::RegisterExtensionWithRequestContexts(
778 const Extension* extension) { 778 const Extension* extension) {
779 // AddRef to ensure the data lives until the other thread gets it. Balanced in 779 // AddRef to ensure the data lives until the other thread gets it. Balanced in
780 // OnNewExtensions. 780 // OnNewExtensions.
781 extension->static_data()->AddRef(); 781 extension->AddRef();
782 BrowserThread::PostTask( 782 BrowserThread::PostTask(
783 BrowserThread::IO, FROM_HERE, 783 BrowserThread::IO, FROM_HERE,
784 NewRunnableMethod(extension_info_map_.get(), 784 NewRunnableMethod(extension_info_map_.get(),
785 &ExtensionInfoMap::AddExtension, 785 &ExtensionInfoMap::AddExtension,
786 extension->static_data())); 786 extension));
787 } 787 }
788 788
789 void ProfileImpl::UnregisterExtensionWithRequestContexts( 789 void ProfileImpl::UnregisterExtensionWithRequestContexts(
790 const Extension* extension) { 790 const Extension* extension) {
791 BrowserThread::PostTask( 791 BrowserThread::PostTask(
792 BrowserThread::IO, FROM_HERE, 792 BrowserThread::IO, FROM_HERE,
793 NewRunnableMethod(extension_info_map_.get(), 793 NewRunnableMethod(extension_info_map_.get(),
794 &ExtensionInfoMap::RemoveExtension, 794 &ExtensionInfoMap::RemoveExtension,
795 extension->id())); 795 extension->id()));
796 } 796 }
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 #if defined(OS_CHROMEOS) 1300 #if defined(OS_CHROMEOS)
1301 chromeos::ProxyConfigServiceImpl* 1301 chromeos::ProxyConfigServiceImpl*
1302 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { 1302 ProfileImpl::GetChromeOSProxyConfigServiceImpl() {
1303 if (!chromeos_proxy_config_service_impl_) { 1303 if (!chromeos_proxy_config_service_impl_) {
1304 chromeos_proxy_config_service_impl_ = 1304 chromeos_proxy_config_service_impl_ =
1305 new chromeos::ProxyConfigServiceImpl(); 1305 new chromeos::ProxyConfigServiceImpl();
1306 } 1306 }
1307 return chromeos_proxy_config_service_impl_; 1307 return chromeos_proxy_config_service_impl_;
1308 } 1308 }
1309 #endif // defined(OS_CHROMEOS) 1309 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698