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

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

Issue 3028033: Add a helper class that keeps per-profile information for FileSystem API (Closed)
Patch Set: fixed tests 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/browser_theme_provider.h" 17 #include "chrome/browser/browser_theme_provider.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/common/chrome_constants.h" 27 #include "chrome/common/chrome_constants.h"
27 #include "chrome/common/chrome_paths.h" 28 #include "chrome/common/chrome_paths.h"
28 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
29 #include "chrome/common/json_pref_store.h" 30 #include "chrome/common/json_pref_store.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 } 307 }
307 308
308 virtual bool HasCreatedDownloadManager() const { 309 virtual bool HasCreatedDownloadManager() const {
309 return (download_manager_.get() != NULL); 310 return (download_manager_.get() != NULL);
310 } 311 }
311 312
312 virtual PersonalDataManager* GetPersonalDataManager() { 313 virtual PersonalDataManager* GetPersonalDataManager() {
313 return NULL; 314 return NULL;
314 } 315 }
315 316
317 virtual FileSystemHostContext* GetFileSystemHostContext() {
318 if (!file_system_host_context_)
319 file_system_host_context_ = new FileSystemHostContext(
320 GetPath(), IsOffTheRecord());
321 DCHECK(file_system_host_context_.get());
322 return file_system_host_context_.get();
323 }
324
316 virtual void InitThemes() { 325 virtual void InitThemes() {
317 profile_->InitThemes(); 326 profile_->InitThemes();
318 } 327 }
319 328
320 virtual void SetTheme(Extension* extension) { 329 virtual void SetTheme(Extension* extension) {
321 profile_->SetTheme(extension); 330 profile_->SetTheme(extension);
322 } 331 }
323 332
324 virtual void SetNativeTheme() { 333 virtual void SetNativeTheme() {
325 profile_->SetNativeTheme(); 334 profile_->SetNativeTheme();
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 568
560 // The main database tracker for this profile. 569 // The main database tracker for this profile.
561 // Should be used only on the file thread. 570 // Should be used only on the file thread.
562 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; 571 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
563 572
564 FilePath last_selected_directory_; 573 FilePath last_selected_directory_;
565 574
566 // Tracks all BackgroundContents running under this profile. 575 // Tracks all BackgroundContents running under this profile.
567 scoped_ptr<BackgroundContentsService> background_contents_service_; 576 scoped_ptr<BackgroundContentsService> background_contents_service_;
568 577
578 // The file_system context for this profile.
579 scoped_refptr<FileSystemHostContext> file_system_host_context_;
580
569 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); 581 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl);
570 }; 582 };
571 583
572 Profile *Profile::CreateOffTheRecordProfile() { 584 Profile *Profile::CreateOffTheRecordProfile() {
573 return new OffTheRecordProfileImpl(this); 585 return new OffTheRecordProfileImpl(this);
574 } 586 }
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