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

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

Issue 3244002: (2nd try) Add a helper class that keeps per-profile information for FileSystem API (Closed)
Patch Set: Created 10 years, 3 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/profile_impl.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) 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.h" 5 #include "chrome/browser/profile.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/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/scoped_ptr.h" 12 #include "base/scoped_ptr.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "chrome/browser/background_contents_service.h" 14 #include "chrome/browser/background_contents_service.h"
15 #include "chrome/browser/browser_list.h" 15 #include "chrome/browser/browser_list.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/chrome_blob_storage_context.h" 17 #include "chrome/browser/chrome_blob_storage_context.h"
18 #include "chrome/browser/chrome_thread.h" 18 #include "chrome/browser/chrome_thread.h"
19 #include "chrome/browser/download/download_manager.h" 19 #include "chrome/browser/download/download_manager.h"
20 #include "chrome/browser/file_system/file_system_host_context.h"
20 #include "chrome/browser/find_bar_state.h" 21 #include "chrome/browser/find_bar_state.h"
21 #include "chrome/browser/in_process_webkit/webkit_context.h" 22 #include "chrome/browser/in_process_webkit/webkit_context.h"
22 #include "chrome/browser/net/chrome_url_request_context.h" 23 #include "chrome/browser/net/chrome_url_request_context.h"
23 #include "chrome/browser/notifications/desktop_notification_service.h" 24 #include "chrome/browser/notifications/desktop_notification_service.h"
24 #include "chrome/browser/ssl/ssl_host_state.h" 25 #include "chrome/browser/ssl/ssl_host_state.h"
25 #include "chrome/browser/sync/profile_sync_service.h" 26 #include "chrome/browser/sync/profile_sync_service.h"
26 #include "chrome/browser/themes/browser_theme_provider.h" 27 #include "chrome/browser/themes/browser_theme_provider.h"
27 #include "chrome/common/chrome_constants.h" 28 #include "chrome/common/chrome_constants.h"
28 #include "chrome/common/chrome_paths.h" 29 #include "chrome/common/chrome_paths.h"
29 #include "chrome/common/chrome_switches.h" 30 #include "chrome/common/chrome_switches.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 } 308 }
308 309
309 virtual bool HasCreatedDownloadManager() const { 310 virtual bool HasCreatedDownloadManager() const {
310 return (download_manager_.get() != NULL); 311 return (download_manager_.get() != NULL);
311 } 312 }
312 313
313 virtual PersonalDataManager* GetPersonalDataManager() { 314 virtual PersonalDataManager* GetPersonalDataManager() {
314 return NULL; 315 return NULL;
315 } 316 }
316 317
318 virtual FileSystemHostContext* GetFileSystemHostContext() {
319 if (!file_system_host_context_)
320 file_system_host_context_ = new FileSystemHostContext(
321 GetPath(), IsOffTheRecord());
322 DCHECK(file_system_host_context_.get());
323 return file_system_host_context_.get();
324 }
325
317 virtual void InitThemes() { 326 virtual void InitThemes() {
318 profile_->InitThemes(); 327 profile_->InitThemes();
319 } 328 }
320 329
321 virtual void SetTheme(Extension* extension) { 330 virtual void SetTheme(Extension* extension) {
322 profile_->SetTheme(extension); 331 profile_->SetTheme(extension);
323 } 332 }
324 333
325 virtual void SetNativeTheme() { 334 virtual void SetNativeTheme() {
326 profile_->SetNativeTheme(); 335 profile_->SetNativeTheme();
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 // Should be used only on the file thread. 583 // Should be used only on the file thread.
575 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; 584 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
576 585
577 FilePath last_selected_directory_; 586 FilePath last_selected_directory_;
578 587
579 // Tracks all BackgroundContents running under this profile. 588 // Tracks all BackgroundContents running under this profile.
580 scoped_ptr<BackgroundContentsService> background_contents_service_; 589 scoped_ptr<BackgroundContentsService> background_contents_service_;
581 590
582 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; 591 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
583 592
593 // The file_system context for this profile.
594 scoped_refptr<FileSystemHostContext> file_system_host_context_;
595
584 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); 596 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl);
585 }; 597 };
586 598
587 Profile *Profile::CreateOffTheRecordProfile() { 599 Profile *Profile::CreateOffTheRecordProfile() {
588 return new OffTheRecordProfileImpl(this); 600 return new OffTheRecordProfileImpl(this);
589 } 601 }
OLDNEW
« no previous file with comments | « chrome/browser/profile.h ('k') | chrome/browser/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698