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

Side by Side Diff: chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.cc

Issue 1958593003: Allow compiling with enable_print_preview=false (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | no next file » | 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 "chrome/browser/extensions/api/cloud_print_private/cloud_print_private_ api.h" 5 #include "chrome/browser/extensions/api/cloud_print_private/cloud_print_private_ api.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/threading/sequenced_worker_pool.h" 9 #include "base/threading/sequenced_worker_pool.h"
10 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 10 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
11 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" 11 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h"
12 #include "chrome/common/extensions/api/cloud_print_private.h" 12 #include "chrome/common/extensions/api/cloud_print_private.h"
13 #include "google_apis/google_api_keys.h" 13 #include "google_apis/google_api_keys.h"
14 #include "net/base/network_interfaces.h" 14 #include "net/base/network_interfaces.h"
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 namespace { 18 namespace {
19 19
20 #if defined(ENABLE_PRINT_PREVIEW)
20 const char kErrorIncognito[] = "Cannot access in incognito mode"; 21 const char kErrorIncognito[] = "Cannot access in incognito mode";
22 #endif
21 23
22 CloudPrintTestsDelegate* g_instance = nullptr; 24 CloudPrintTestsDelegate* g_instance = nullptr;
23 25
24 } // namespace 26 } // namespace
25 27
26 CloudPrintTestsDelegate* CloudPrintTestsDelegate::Get() { 28 CloudPrintTestsDelegate* CloudPrintTestsDelegate::Get() {
27 return g_instance; 29 return g_instance;
28 } 30 }
29 31
30 CloudPrintTestsDelegate::CloudPrintTestsDelegate() { 32 CloudPrintTestsDelegate::CloudPrintTestsDelegate() {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 bool CloudPrintPrivateGetClientIdFunction::RunAsync() { 129 bool CloudPrintPrivateGetClientIdFunction::RunAsync() {
128 SetResult(new base::StringValue( 130 SetResult(new base::StringValue(
129 CloudPrintTestsDelegate::Get() 131 CloudPrintTestsDelegate::Get()
130 ? CloudPrintTestsDelegate::Get()->GetClientId() 132 ? CloudPrintTestsDelegate::Get()->GetClientId()
131 : google_apis::GetOAuth2ClientID(google_apis::CLIENT_CLOUD_PRINT))); 133 : google_apis::GetOAuth2ClientID(google_apis::CLIENT_CLOUD_PRINT)));
132 SendResponse(true); 134 SendResponse(true);
133 return true; 135 return true;
134 } 136 }
135 137
136 } // namespace extensions 138 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698