| OLD | NEW |
| 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/lock.h" | 10 #include "base/lock.h" |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 scoped_ptr<OffTheRecordProfileImpl> p(new OffTheRecordProfileImpl(this)); | 645 scoped_ptr<OffTheRecordProfileImpl> p(new OffTheRecordProfileImpl(this)); |
| 646 off_the_record_profile_.swap(p); | 646 off_the_record_profile_.swap(p); |
| 647 } | 647 } |
| 648 return off_the_record_profile_.get(); | 648 return off_the_record_profile_.get(); |
| 649 } | 649 } |
| 650 | 650 |
| 651 Profile* ProfileImpl::GetOriginalProfile() { | 651 Profile* ProfileImpl::GetOriginalProfile() { |
| 652 return this; | 652 return this; |
| 653 } | 653 } |
| 654 | 654 |
| 655 static void BroadcastNewHistoryTable(SharedMemory* table_memory) { | 655 static void BroadcastNewHistoryTable(base::SharedMemory* table_memory) { |
| 656 if (!table_memory) | 656 if (!table_memory) |
| 657 return; | 657 return; |
| 658 | 658 |
| 659 // send to all RenderProcessHosts | 659 // send to all RenderProcessHosts |
| 660 for (RenderProcessHost::iterator i = RenderProcessHost::begin(); | 660 for (RenderProcessHost::iterator i = RenderProcessHost::begin(); |
| 661 i != RenderProcessHost::end(); i++) { | 661 i != RenderProcessHost::end(); i++) { |
| 662 if (!i->second->channel()) | 662 if (!i->second->channel()) |
| 663 continue; | 663 continue; |
| 664 | 664 |
| 665 SharedMemoryHandle new_table; | 665 base::SharedMemoryHandle new_table; |
| 666 HANDLE process = i->second->process().handle(); | 666 HANDLE process = i->second->process().handle(); |
| 667 if (!process) { | 667 if (!process) { |
| 668 // process can be null if it's started with the --single-process flag. | 668 // process can be null if it's started with the --single-process flag. |
| 669 process = GetCurrentProcess(); | 669 process = GetCurrentProcess(); |
| 670 } | 670 } |
| 671 | 671 |
| 672 table_memory->ShareToProcess(process, &new_table); | 672 table_memory->ShareToProcess(process, &new_table); |
| 673 IPC::Message* msg = new ViewMsg_VisitedLink_NewTable(new_table); | 673 IPC::Message* msg = new ViewMsg_VisitedLink_NewTable(new_table); |
| 674 i->second->channel()->Send(msg); | 674 i->second->channel()->Send(msg); |
| 675 } | 675 } |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 } | 990 } |
| 991 | 991 |
| 992 #ifdef CHROME_PERSONALIZATION | 992 #ifdef CHROME_PERSONALIZATION |
| 993 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() { | 993 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() { |
| 994 if (!personalization_.get()) | 994 if (!personalization_.get()) |
| 995 personalization_.reset( | 995 personalization_.reset( |
| 996 Personalization::CreateProfilePersonalization(this)); | 996 Personalization::CreateProfilePersonalization(this)); |
| 997 return personalization_.get(); | 997 return personalization_.get(); |
| 998 } | 998 } |
| 999 #endif | 999 #endif |
| OLD | NEW |