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

Side by Side Diff: android_webview/browser/aw_browser_context.cc

Issue 1741953002: mojo: Sketch a profile application. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't add a boolean to BrowserContext; allocate an object instead. Created 4 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
« no previous file with comments | « no previous file | blimp/engine/common/blimp_browser_context.cc » ('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) 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 #include "android_webview/browser/aw_browser_context.h" 5 #include "android_webview/browser/aw_browser_context.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/aw_browser_policy_connector.h" 9 #include "android_webview/browser/aw_browser_policy_connector.h"
10 #include "android_webview/browser/aw_form_database_service.h" 10 #include "android_webview/browser/aw_form_database_service.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Delete the legacy cache dir (in the app data dir) in 10 seconds after init. 122 // Delete the legacy cache dir (in the app data dir) in 10 seconds after init.
123 int AwBrowserContext::legacy_cache_removal_delay_ms_ = 10000; 123 int AwBrowserContext::legacy_cache_removal_delay_ms_ = 10000;
124 124
125 AwBrowserContext::AwBrowserContext( 125 AwBrowserContext::AwBrowserContext(
126 const FilePath path, 126 const FilePath path,
127 JniDependencyFactory* native_factory) 127 JniDependencyFactory* native_factory)
128 : context_storage_path_(path), 128 : context_storage_path_(path),
129 native_factory_(native_factory) { 129 native_factory_(native_factory) {
130 DCHECK(!g_browser_context); 130 DCHECK(!g_browser_context);
131 g_browser_context = this; 131 g_browser_context = this;
132 BrowserContext::Initialize(this, path);
132 133
133 // This constructor is entered during the creation of ContentBrowserClient, 134 // This constructor is entered during the creation of ContentBrowserClient,
134 // before browser threads are created. Therefore any checks to enforce 135 // before browser threads are created. Therefore any checks to enforce
135 // threading (such as BrowserThread::CurrentlyOn()) will fail here. 136 // threading (such as BrowserThread::CurrentlyOn()) will fail here.
136 } 137 }
137 138
138 AwBrowserContext::~AwBrowserContext() { 139 AwBrowserContext::~AwBrowserContext() {
139 DCHECK_EQ(this, g_browser_context); 140 DCHECK_EQ(this, g_browser_context);
140 g_browser_context = NULL; 141 g_browser_context = NULL;
141 } 142 }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 return; 471 return;
471 // We don't care about commit_delay for now. It is just a dummy value. 472 // We don't care about commit_delay for now. It is just a dummy value.
472 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); 473 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60);
473 data_reduction_proxy_service->EnableCompressionStatisticsLogging( 474 data_reduction_proxy_service->EnableCompressionStatisticsLogging(
474 user_pref_service_.get(), 475 user_pref_service_.get(),
475 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), 476 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
476 commit_delay); 477 commit_delay);
477 } 478 }
478 479
479 } // namespace android_webview 480 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | blimp/engine/common/blimp_browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698