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

Side by Side Diff: extensions/shell/browser/shell_extensions_browser_client.cc

Issue 870163002: Move networking_private to src/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Linux fix Created 5 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/shell/browser/shell_extensions_browser_client.h" 5 #include "extensions/shell/browser/shell_extensions_browser_client.h"
6 6
7 #include "content/public/browser/browser_context.h"
7 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
8 #include "extensions/browser/api/extensions_api_client.h" 9 #include "extensions/browser/api/extensions_api_client.h"
9 #include "extensions/browser/api/generated_api_registration.h" 10 #include "extensions/browser/api/generated_api_registration.h"
10 #include "extensions/browser/app_sorting.h" 11 #include "extensions/browser/app_sorting.h"
11 #include "extensions/browser/event_router.h" 12 #include "extensions/browser/event_router.h"
12 #include "extensions/browser/extension_function_registry.h" 13 #include "extensions/browser/extension_function_registry.h"
13 #include "extensions/browser/null_app_sorting.h" 14 #include "extensions/browser/null_app_sorting.h"
14 #include "extensions/browser/updater/null_extension_cache.h" 15 #include "extensions/browser/updater/null_extension_cache.h"
15 #include "extensions/browser/url_request_util.h" 16 #include "extensions/browser/url_request_util.h"
16 #include "extensions/shell/browser/api/generated_api_registration.h" 17 #include "extensions/shell/browser/api/generated_api_registration.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 BrowserContext* context) { 65 BrowserContext* context) {
65 // app_shell only supports a single context. 66 // app_shell only supports a single context.
66 return NULL; 67 return NULL;
67 } 68 }
68 69
69 BrowserContext* ShellExtensionsBrowserClient::GetOriginalContext( 70 BrowserContext* ShellExtensionsBrowserClient::GetOriginalContext(
70 BrowserContext* context) { 71 BrowserContext* context) {
71 return context; 72 return context;
72 } 73 }
73 74
75 std::string ShellExtensionsBrowserClient::GetUserIdHashFromContext(
76 content::BrowserContext* context) {
77 return context->GetPath().BaseName().value();
James Cook 2015/01/24 03:59:24 app_shell on Brillo doesn't have a real logged-in
stevenjb 2015/01/26 20:36:19 Returning an empty string. If that ends up causing
James Cook 2015/01/26 21:20:55 I'm nervous that this might cause a hard-to-interp
stevenjb 2015/01/27 01:39:37 This is only called from the networkingPrivate API
78 }
79
74 bool ShellExtensionsBrowserClient::IsGuestSession( 80 bool ShellExtensionsBrowserClient::IsGuestSession(
75 BrowserContext* context) const { 81 BrowserContext* context) const {
76 return false; 82 return false;
77 } 83 }
78 84
79 bool ShellExtensionsBrowserClient::IsExtensionIncognitoEnabled( 85 bool ShellExtensionsBrowserClient::IsExtensionIncognitoEnabled(
80 const std::string& extension_id, 86 const std::string& extension_id,
81 content::BrowserContext* context) const { 87 content::BrowserContext* context) const {
82 return false; 88 return false;
83 } 89 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 const std::string& min_version) { 220 const std::string& min_version) {
215 return true; 221 return true;
216 } 222 }
217 223
218 void ShellExtensionsBrowserClient::SetAPIClientForTest( 224 void ShellExtensionsBrowserClient::SetAPIClientForTest(
219 ExtensionsAPIClient* api_client) { 225 ExtensionsAPIClient* api_client) {
220 api_client_.reset(api_client); 226 api_client_.reset(api_client);
221 } 227 }
222 228
223 } // namespace extensions 229 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698