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

Side by Side Diff: chrome/browser/profiles/profile_io_data.h

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Charlie's comments. Created 7 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 static bool IsHandledURL(const GURL& url); 78 static bool IsHandledURL(const GURL& url);
79 79
80 // Called by Profile. 80 // Called by Profile.
81 content::ResourceContext* GetResourceContext() const; 81 content::ResourceContext* GetResourceContext() const;
82 82
83 // Initializes the ProfileIOData object and primes the RequestContext 83 // Initializes the ProfileIOData object and primes the RequestContext
84 // generation. Must be called prior to any of the Get*() methods other than 84 // generation. Must be called prior to any of the Get*() methods other than
85 // GetResouceContext or GetMetricsEnabledStateOnIOThread. 85 // GetResouceContext or GetMetricsEnabledStateOnIOThread.
86 void Init( 86 void Init(
87 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 87 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
88 blob_protocol_handler,
89 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
90 file_system_protocol_handler,
91 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
92 developer_protocol_handler, 88 developer_protocol_handler,
93 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 89 content::ProtocolHandlerMap* protocol_handlers) const;
94 chrome_protocol_handler,
95 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
96 chrome_devtools_protocol_handler) const;
97 90
98 ChromeURLRequestContext* GetMainRequestContext() const; 91 ChromeURLRequestContext* GetMainRequestContext() const;
99 ChromeURLRequestContext* GetMediaRequestContext() const; 92 ChromeURLRequestContext* GetMediaRequestContext() const;
100 ChromeURLRequestContext* GetExtensionsRequestContext() const; 93 ChromeURLRequestContext* GetExtensionsRequestContext() const;
101 ChromeURLRequestContext* GetIsolatedAppRequestContext( 94 ChromeURLRequestContext* GetIsolatedAppRequestContext(
102 ChromeURLRequestContext* main_context, 95 ChromeURLRequestContext* main_context,
103 const StoragePartitionDescriptor& partition_descriptor, 96 const StoragePartitionDescriptor& partition_descriptor,
104 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 97 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
105 protocol_handler_interceptor, 98 protocol_handler_interceptor,
106 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 99 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
107 blob_protocol_handler,
108 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
109 file_system_protocol_handler,
110 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
111 developer_protocol_handler, 100 developer_protocol_handler,
112 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 101 content::ProtocolHandlerMap* protocol_handlers) const;
113 chrome_protocol_handler,
114 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
115 chrome_devtools_protocol_handler) const;
116 ChromeURLRequestContext* GetIsolatedMediaRequestContext( 102 ChromeURLRequestContext* GetIsolatedMediaRequestContext(
117 ChromeURLRequestContext* app_context, 103 ChromeURLRequestContext* app_context,
118 const StoragePartitionDescriptor& partition_descriptor) const; 104 const StoragePartitionDescriptor& partition_descriptor) const;
119 105
120 // These are useful when the Chrome layer is called from the content layer 106 // These are useful when the Chrome layer is called from the content layer
121 // with a content::ResourceContext, and they want access to Chrome data for 107 // with a content::ResourceContext, and they want access to Chrome data for
122 // that profile. 108 // that profile.
123 ExtensionInfoMap* GetExtensionInfoMap() const; 109 ExtensionInfoMap* GetExtensionInfoMap() const;
124 CookieSettings* GetCookieSettings() const; 110 CookieSettings* GetCookieSettings() const;
125 111
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 362
377 // -------------------------------------------- 363 // --------------------------------------------
378 // Virtual interface for subtypes to implement: 364 // Virtual interface for subtypes to implement:
379 // -------------------------------------------- 365 // --------------------------------------------
380 366
381 // Does the actual initialization of the ProfileIOData subtype. Subtypes 367 // Does the actual initialization of the ProfileIOData subtype. Subtypes
382 // should use the static helper functions above to implement this. 368 // should use the static helper functions above to implement this.
383 virtual void InitializeInternal( 369 virtual void InitializeInternal(
384 ProfileParams* profile_params, 370 ProfileParams* profile_params,
385 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 371 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
386 blob_protocol_handler,
387 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
388 file_system_protocol_handler,
389 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
390 developer_protocol_handler, 372 developer_protocol_handler,
391 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 373 content::ProtocolHandlerMap* protocol_handlers) const = 0;
392 chrome_protocol_handler,
393 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
394 chrome_devtools_protocol_handler) const = 0;
395 374
396 // Initializes the RequestContext for extensions. 375 // Initializes the RequestContext for extensions.
397 virtual void InitializeExtensionsRequestContext( 376 virtual void InitializeExtensionsRequestContext(
398 ProfileParams* profile_params) const = 0; 377 ProfileParams* profile_params) const = 0;
399 // Does an on-demand initialization of a RequestContext for the given 378 // Does an on-demand initialization of a RequestContext for the given
400 // isolated app. 379 // isolated app.
401 virtual ChromeURLRequestContext* InitializeAppRequestContext( 380 virtual ChromeURLRequestContext* InitializeAppRequestContext(
402 ChromeURLRequestContext* main_context, 381 ChromeURLRequestContext* main_context,
403 const StoragePartitionDescriptor& details, 382 const StoragePartitionDescriptor& details,
404 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 383 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
405 protocol_handler_interceptor, 384 protocol_handler_interceptor,
406 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 385 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
407 blob_protocol_handler,
408 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
409 file_system_protocol_handler,
410 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
411 developer_protocol_handler, 386 developer_protocol_handler,
412 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 387 content::ProtocolHandlerMap* protocol_handlers) const = 0;
413 chrome_protocol_handler,
414 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
415 chrome_devtools_protocol_handler) const = 0;
416 388
417 // Does an on-demand initialization of a media RequestContext for the given 389 // Does an on-demand initialization of a media RequestContext for the given
418 // isolated app. 390 // isolated app.
419 virtual ChromeURLRequestContext* InitializeMediaRequestContext( 391 virtual ChromeURLRequestContext* InitializeMediaRequestContext(
420 ChromeURLRequestContext* original_context, 392 ChromeURLRequestContext* original_context,
421 const StoragePartitionDescriptor& details) const = 0; 393 const StoragePartitionDescriptor& details) const = 0;
422 394
423 // These functions are used to transfer ownership of the lazily initialized 395 // These functions are used to transfer ownership of the lazily initialized
424 // context from ProfileIOData to the URLRequestContextGetter. 396 // context from ProfileIOData to the URLRequestContextGetter.
425 virtual ChromeURLRequestContext* 397 virtual ChromeURLRequestContext*
426 AcquireMediaRequestContext() const = 0; 398 AcquireMediaRequestContext() const = 0;
427 virtual ChromeURLRequestContext* 399 virtual ChromeURLRequestContext*
428 AcquireIsolatedAppRequestContext( 400 AcquireIsolatedAppRequestContext(
429 ChromeURLRequestContext* main_context, 401 ChromeURLRequestContext* main_context,
430 const StoragePartitionDescriptor& partition_descriptor, 402 const StoragePartitionDescriptor& partition_descriptor,
431 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 403 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
432 protocol_handler_interceptor, 404 protocol_handler_interceptor,
433 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 405 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
434 blob_protocol_handler,
435 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
436 file_system_protocol_handler,
437 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
438 developer_protocol_handler, 406 developer_protocol_handler,
439 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 407 content::ProtocolHandlerMap* protocol_handlers) const = 0;
440 chrome_protocol_handler,
441 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
442 chrome_devtools_protocol_handler) const = 0;
443 virtual ChromeURLRequestContext* 408 virtual ChromeURLRequestContext*
444 AcquireIsolatedMediaRequestContext( 409 AcquireIsolatedMediaRequestContext(
445 ChromeURLRequestContext* app_context, 410 ChromeURLRequestContext* app_context,
446 const StoragePartitionDescriptor& partition_descriptor) const = 0; 411 const StoragePartitionDescriptor& partition_descriptor) const = 0;
447 412
448 // Returns the LoadTimeStats object to be used for this profile. 413 // Returns the LoadTimeStats object to be used for this profile.
449 virtual chrome_browser_net::LoadTimeStats* GetLoadTimeStats( 414 virtual chrome_browser_net::LoadTimeStats* GetLoadTimeStats(
450 IOThread::Globals* io_thread_globals) const = 0; 415 IOThread::Globals* io_thread_globals) const = 0;
451 416
452 // The order *DOES* matter for the majority of these member variables, so 417 // The order *DOES* matter for the majority of these member variables, so
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 513
549 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. 514 // TODO(jhawkins): Remove once crbug.com/102004 is fixed.
550 bool initialized_on_UI_thread_; 515 bool initialized_on_UI_thread_;
551 516
552 bool is_incognito_; 517 bool is_incognito_;
553 518
554 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); 519 DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
555 }; 520 };
556 521
557 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 522 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698