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

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

Issue 7063030: PrintPreview: Print Preview is not staying associated with initiator renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/profiles/profile.h" 5 #include "chrome/browser/profiles/profile.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/file_util.h" 12 #include "base/file_util.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/path_service.h" 14 #include "base/path_service.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "chrome/browser/background_contents_service_factory.h" 17 #include "chrome/browser/background_contents_service_factory.h"
18 #include "chrome/browser/browser_process.h" 18 #include "chrome/browser/browser_process.h"
19 #include "chrome/browser/content_settings/host_content_settings_map.h" 19 #include "chrome/browser/content_settings/host_content_settings_map.h"
20 #include "chrome/browser/download/download_manager.h" 20 #include "chrome/browser/download/download_manager.h"
21 #include "chrome/browser/extensions/extension_message_service.h" 21 #include "chrome/browser/extensions/extension_message_service.h"
22 #include "chrome/browser/extensions/extension_pref_store.h" 22 #include "chrome/browser/extensions/extension_pref_store.h"
23 #include "chrome/browser/extensions/extension_process_manager.h" 23 #include "chrome/browser/extensions/extension_process_manager.h"
24 #include "chrome/browser/extensions/extension_service.h" 24 #include "chrome/browser/extensions/extension_service.h"
25 #include "chrome/browser/extensions/extension_special_storage_policy.h" 25 #include "chrome/browser/extensions/extension_special_storage_policy.h"
26 #include "chrome/browser/net/pref_proxy_config_service.h" 26 #include "chrome/browser/net/pref_proxy_config_service.h"
27 #include "chrome/browser/prefs/pref_service.h" 27 #include "chrome/browser/prefs/pref_service.h"
28 #include "chrome/browser/printing/print_preview_data_service_factory.h"
Lei Zhang 2011/05/27 17:26:53 nit: ordering
kmadhusu 2011/05/27 23:44:42 Ordering LGTM.
28 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" 29 #include "chrome/browser/profiles/off_the_record_profile_io_data.h"
29 #include "chrome/browser/profiles/profile_dependency_manager.h" 30 #include "chrome/browser/profiles/profile_dependency_manager.h"
30 #include "chrome/browser/ssl/ssl_host_state.h" 31 #include "chrome/browser/ssl/ssl_host_state.h"
31 #include "chrome/browser/sync/profile_sync_service.h" 32 #include "chrome/browser/sync/profile_sync_service.h"
32 #include "chrome/browser/themes/theme_service.h" 33 #include "chrome/browser/themes/theme_service.h"
33 #include "chrome/browser/transport_security_persister.h" 34 #include "chrome/browser/transport_security_persister.h"
34 #include "chrome/browser/ui/browser_list.h" 35 #include "chrome/browser/ui/browser_list.h"
35 #include "chrome/browser/ui/find_bar/find_bar_state.h" 36 #include "chrome/browser/ui/find_bar/find_bar_state.h"
36 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 37 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
37 #include "chrome/browser/ui/webui/extension_icon_source.h" 38 #include "chrome/browser/ui/webui/extension_icon_source.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 explicit OffTheRecordProfileImpl(Profile* real_profile) 199 explicit OffTheRecordProfileImpl(Profile* real_profile)
199 : profile_(real_profile), 200 : profile_(real_profile),
200 prefs_(real_profile->GetOffTheRecordPrefs()), 201 prefs_(real_profile->GetOffTheRecordPrefs()),
201 ALLOW_THIS_IN_INITIALIZER_LIST(io_data_(this)), 202 ALLOW_THIS_IN_INITIALIZER_LIST(io_data_(this)),
202 start_time_(Time::Now()) { 203 start_time_(Time::Now()) {
203 extension_process_manager_.reset(ExtensionProcessManager::Create(this)); 204 extension_process_manager_.reset(ExtensionProcessManager::Create(this));
204 205
205 BrowserList::AddObserver(this); 206 BrowserList::AddObserver(this);
206 207
207 BackgroundContentsServiceFactory::GetForProfile(this); 208 BackgroundContentsServiceFactory::GetForProfile(this);
209 PrintPreviewDataServiceFactory::GetForProfile(this);
Elliot Glaysher 2011/05/27 17:45:50 Does this really need to be force initialized duri
kmadhusu 2011/05/27 23:44:42 Forced initialization is not required. Removed the
208 210
209 DCHECK(real_profile->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled)); 211 DCHECK(real_profile->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled));
210 212
211 // TODO(oshima): Remove the need to eagerly initialize the request context 213 // TODO(oshima): Remove the need to eagerly initialize the request context
212 // getter. chromeos::OnlineAttempt is illegally trying to access this 214 // getter. chromeos::OnlineAttempt is illegally trying to access this
213 // Profile member from a thread other than the UI thread, so we need to 215 // Profile member from a thread other than the UI thread, so we need to
214 // prevent a race. 216 // prevent a race.
215 #if defined(OS_CHROMEOS) 217 #if defined(OS_CHROMEOS)
216 GetRequestContext(); 218 GetRequestContext();
217 #endif // defined(OS_CHROMEOS) 219 #endif // defined(OS_CHROMEOS)
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 }; 817 };
816 #endif 818 #endif
817 819
818 Profile* Profile::CreateOffTheRecordProfile() { 820 Profile* Profile::CreateOffTheRecordProfile() {
819 #if defined(OS_CHROMEOS) 821 #if defined(OS_CHROMEOS)
820 if (Profile::IsGuestSession()) 822 if (Profile::IsGuestSession())
821 return new GuestSessionProfile(this); 823 return new GuestSessionProfile(this);
822 #endif 824 #endif
823 return new OffTheRecordProfileImpl(this); 825 return new OffTheRecordProfileImpl(this);
824 } 826 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698