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

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

Issue 113591: Fix Acid3 Test 48: LINKTEST, Chromium side.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Made waiting more bearable. 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
« no previous file with comments | « chrome/browser/profile.h ('k') | chrome/browser/renderer_host/browser_render_process_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 15 matching lines...) Expand all
26 #include "chrome/browser/profile_manager.h" 26 #include "chrome/browser/profile_manager.h"
27 #include "chrome/browser/renderer_host/render_process_host.h" 27 #include "chrome/browser/renderer_host/render_process_host.h"
28 #include "chrome/browser/search_engines/template_url_fetcher.h" 28 #include "chrome/browser/search_engines/template_url_fetcher.h"
29 #include "chrome/browser/search_engines/template_url_model.h" 29 #include "chrome/browser/search_engines/template_url_model.h"
30 #include "chrome/browser/sessions/session_service.h" 30 #include "chrome/browser/sessions/session_service.h"
31 #include "chrome/browser/sessions/tab_restore_service.h" 31 #include "chrome/browser/sessions/tab_restore_service.h"
32 #include "chrome/browser/spellchecker.h" 32 #include "chrome/browser/spellchecker.h"
33 #include "chrome/browser/ssl/ssl_host_state.h" 33 #include "chrome/browser/ssl/ssl_host_state.h"
34 #include "chrome/browser/thumbnail_store.h" 34 #include "chrome/browser/thumbnail_store.h"
35 #include "chrome/browser/visitedlink_master.h" 35 #include "chrome/browser/visitedlink_master.h"
36 #include "chrome/browser/visitedlink_event_listener.h"
36 #include "chrome/browser/webdata/web_data_service.h" 37 #include "chrome/browser/webdata/web_data_service.h"
37 #include "chrome/common/chrome_constants.h" 38 #include "chrome/common/chrome_constants.h"
38 #include "chrome/common/chrome_paths.h" 39 #include "chrome/common/chrome_paths.h"
39 #include "chrome/common/chrome_switches.h" 40 #include "chrome/common/chrome_switches.h"
40 #include "chrome/common/extensions/extension_error_reporter.h" 41 #include "chrome/common/extensions/extension_error_reporter.h"
41 #include "chrome/common/net/cookie_monster_sqlite.h" 42 #include "chrome/common/net/cookie_monster_sqlite.h"
42 #include "chrome/common/notification_service.h" 43 #include "chrome/common/notification_service.h"
43 #include "chrome/common/pref_names.h" 44 #include "chrome/common/pref_names.h"
44 #include "chrome/common/render_messages.h" 45 #include "chrome/common/render_messages.h"
45 #include "grit/locale_settings.h" 46 #include "grit/locale_settings.h"
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 scoped_ptr<net::ForceTLSState> force_tls_state_; 461 scoped_ptr<net::ForceTLSState> force_tls_state_;
461 462
462 // Time we were started. 463 // Time we were started.
463 Time start_time_; 464 Time start_time_;
464 465
465 DISALLOW_EVIL_CONSTRUCTORS(OffTheRecordProfileImpl); 466 DISALLOW_EVIL_CONSTRUCTORS(OffTheRecordProfileImpl);
466 }; 467 };
467 468
468 ProfileImpl::ProfileImpl(const FilePath& path) 469 ProfileImpl::ProfileImpl(const FilePath& path)
469 : path_(path), 470 : path_(path),
471 visited_link_event_listener_(new VisitedLinkEventListener()),
470 request_context_(NULL), 472 request_context_(NULL),
471 media_request_context_(NULL), 473 media_request_context_(NULL),
472 extensions_request_context_(NULL), 474 extensions_request_context_(NULL),
473 blacklist_(NULL), 475 blacklist_(NULL),
474 history_service_created_(false), 476 history_service_created_(false),
475 created_web_data_service_(false), 477 created_web_data_service_(false),
476 created_password_store_(false), 478 created_password_store_(false),
477 created_download_manager_(false), 479 created_download_manager_(false),
478 created_theme_provider_(false), 480 created_theme_provider_(false),
479 start_time_(Time::Now()), 481 start_time_(Time::Now()),
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 } 656 }
655 657
656 void ProfileImpl::DestroyOffTheRecordProfile() { 658 void ProfileImpl::DestroyOffTheRecordProfile() {
657 off_the_record_profile_.reset(); 659 off_the_record_profile_.reset();
658 } 660 }
659 661
660 Profile* ProfileImpl::GetOriginalProfile() { 662 Profile* ProfileImpl::GetOriginalProfile() {
661 return this; 663 return this;
662 } 664 }
663 665
664 static void BroadcastNewHistoryTable(base::SharedMemory* table_memory) {
665 if (!table_memory)
666 return;
667
668 // send to all RenderProcessHosts
669 for (RenderProcessHost::iterator i = RenderProcessHost::begin();
670 i != RenderProcessHost::end(); i++) {
671 if (!i->second->HasConnection())
672 continue;
673
674 base::SharedMemoryHandle new_table;
675 base::ProcessHandle process = i->second->process().handle();
676 if (!process) {
677 // process can be null if it's started with the --single-process flag.
678 process = base::Process::Current().handle();
679 }
680
681 table_memory->ShareToProcess(process, &new_table);
682 IPC::Message* msg = new ViewMsg_VisitedLink_NewTable(new_table);
683 i->second->Send(msg);
684 }
685 }
686
687 VisitedLinkMaster* ProfileImpl::GetVisitedLinkMaster() { 666 VisitedLinkMaster* ProfileImpl::GetVisitedLinkMaster() {
688 if (!visited_link_master_.get()) { 667 if (!visited_link_master_.get()) {
689 scoped_ptr<VisitedLinkMaster> visited_links( 668 scoped_ptr<VisitedLinkMaster> visited_links(
690 new VisitedLinkMaster(g_browser_process->file_thread(), 669 new VisitedLinkMaster(g_browser_process->file_thread(),
691 BroadcastNewHistoryTable, this)); 670 visited_link_event_listener_.get(), this));
692 if (!visited_links->Init()) 671 if (!visited_links->Init())
693 return NULL; 672 return NULL;
694 visited_link_master_.swap(visited_links); 673 visited_link_master_.swap(visited_links);
695 } 674 }
696 675
697 return visited_link_master_.get(); 676 return visited_link_master_.get();
698 } 677 }
699 678
700 ExtensionsService* ProfileImpl::GetExtensionsService() { 679 ExtensionsService* ProfileImpl::GetExtensionsService() {
701 return extensions_service_.get(); 680 return extensions_service_.get();
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 1133
1155 void ProfileImpl::StopCreateSessionServiceTimer() { 1134 void ProfileImpl::StopCreateSessionServiceTimer() {
1156 create_session_service_timer_.Stop(); 1135 create_session_service_timer_.Stop();
1157 } 1136 }
1158 1137
1159 #ifdef CHROME_PERSONALIZATION 1138 #ifdef CHROME_PERSONALIZATION
1160 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() { 1139 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() {
1161 return personalization_.get(); 1140 return personalization_.get();
1162 } 1141 }
1163 #endif 1142 #endif
OLDNEW
« no previous file with comments | « chrome/browser/profile.h ('k') | chrome/browser/renderer_host/browser_render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698