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

Side by Side Diff: extensions/common/api/printer_provider/usb_printer_manifest_handler_android.cc

Issue 1409033007: Aura on Android: Stub implementation of UsbPrinterManifestHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a problem with the gypi file. Created 5 years, 1 month 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 | « extensions/common/BUILD.gn ('k') | extensions/extensions.gypi » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/common/api/printer_provider/usb_printer_manifest_handler.h" 5 #include "extensions/common/api/printer_provider/usb_printer_manifest_handler.h"
6 6
7 #include "extensions/common/api/printer_provider/usb_printer_manifest_data.h"
8 #include "extensions/common/extension.h" 7 #include "extensions/common/extension.h"
9 #include "extensions/common/manifest_constants.h"
10 8
11 namespace extensions { 9 namespace extensions {
12 10
13 UsbPrinterManifestHandler::UsbPrinterManifestHandler() { 11 UsbPrinterManifestHandler::UsbPrinterManifestHandler() {
14 } 12 }
15 13
16 UsbPrinterManifestHandler::~UsbPrinterManifestHandler() { 14 UsbPrinterManifestHandler::~UsbPrinterManifestHandler() {
17 } 15 }
18 16
19 bool UsbPrinterManifestHandler::Parse(Extension* extension, 17 bool UsbPrinterManifestHandler::Parse(Extension* extension,
20 base::string16* error) { 18 base::string16* error) {
21 const base::Value* usb_printers = nullptr; 19 return false;
22 CHECK(extension->manifest()->Get(manifest_keys::kUsbPrinters, &usb_printers));
23 scoped_ptr<UsbPrinterManifestData> data =
24 UsbPrinterManifestData::FromValue(*usb_printers, error);
25 if (!data) {
26 return false;
27 }
28
29 extension->SetManifestData(manifest_keys::kUsbPrinters, data.release());
30 return true;
31 } 20 }
32 21
33 const std::vector<std::string> UsbPrinterManifestHandler::Keys() const { 22 const std::vector<std::string> UsbPrinterManifestHandler::Keys() const {
34 return SingleKey(manifest_keys::kUsbPrinters); 23 return std::vector<std::string>();
35 } 24 }
36 25
37 } // namespace extensions 26 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/BUILD.gn ('k') | extensions/extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698