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

Side by Side Diff: extensions/common/manifest_handlers/launcher_page_info.cc

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/common/manifest_handlers/launcher_page_info.h" 5 #include "extensions/common/manifest_handlers/launcher_page_info.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "extensions/common/manifest.h" 9 #include "extensions/common/manifest.h"
10 #include "extensions/common/manifest_constants.h" 10 #include "extensions/common/manifest_constants.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // static 22 // static
23 LauncherPageInfo* LauncherPageHandler::GetInfo(const Extension* extension) { 23 LauncherPageInfo* LauncherPageHandler::GetInfo(const Extension* extension) {
24 return static_cast<LauncherPageInfo*>( 24 return static_cast<LauncherPageInfo*>(
25 extension->GetManifestData(manifest_keys::kLauncherPage)); 25 extension->GetManifestData(manifest_keys::kLauncherPage));
26 } 26 }
27 27
28 bool LauncherPageHandler::Parse(Extension* extension, base::string16* error) { 28 bool LauncherPageHandler::Parse(Extension* extension, base::string16* error) {
29 const extensions::Manifest* manifest = extension->manifest(); 29 const extensions::Manifest* manifest = extension->manifest();
30 scoped_ptr<LauncherPageInfo> launcher_page_info(new LauncherPageInfo); 30 scoped_ptr<LauncherPageInfo> launcher_page_info(new LauncherPageInfo);
31 const base::DictionaryValue* launcher_page_dict = NULL; 31 const base::DictionaryValue* launcher_page_dict = nullptr;
32 if (!manifest->GetDictionary(manifest_keys::kLauncherPage, 32 if (!manifest->GetDictionary(manifest_keys::kLauncherPage,
33 &launcher_page_dict)) { 33 &launcher_page_dict)) {
34 *error = base::ASCIIToUTF16(manifest_errors::kInvalidLauncherPage); 34 *error = base::ASCIIToUTF16(manifest_errors::kInvalidLauncherPage);
35 return false; 35 return false;
36 } 36 }
37 37
38 if (!manifest->HasPath(extensions::manifest_keys::kLauncherPagePage)) { 38 if (!manifest->HasPath(extensions::manifest_keys::kLauncherPagePage)) {
39 *error = base::ASCIIToUTF16(manifest_errors::kLauncherPagePageRequired); 39 *error = base::ASCIIToUTF16(manifest_errors::kLauncherPagePageRequired);
40 return false; 40 return false;
41 } 41 }
(...skipping 25 matching lines...) Expand all
67 } 67 }
68 68
69 return true; 69 return true;
70 } 70 }
71 71
72 const std::vector<std::string> LauncherPageHandler::Keys() const { 72 const std::vector<std::string> LauncherPageHandler::Keys() const {
73 return SingleKey(manifest_keys::kLauncherPage); 73 return SingleKey(manifest_keys::kLauncherPage);
74 } 74 }
75 75
76 } // namespace extensions 76 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698