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

Side by Side Diff: chrome/browser/extensions/api/module/module.cc

Issue 252653002: Rename (Chrome)SyncExtensionFunction::RunImpl to RunSync so that the RunImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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/module/module.h" 5 #include "chrome/browser/extensions/api/module/module.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 18 matching lines...) Expand all
29 29
30 std::string GetUpdateURLData(const ExtensionPrefs* prefs, 30 std::string GetUpdateURLData(const ExtensionPrefs* prefs,
31 const std::string& extension_id) { 31 const std::string& extension_id) {
32 std::string data; 32 std::string data;
33 prefs->ReadPrefAsString(extension_id, kUpdateURLData, &data); 33 prefs->ReadPrefAsString(extension_id, kUpdateURLData, &data);
34 return data; 34 return data;
35 } 35 }
36 36
37 } // namespace extension 37 } // namespace extension
38 38
39 bool ExtensionSetUpdateUrlDataFunction::RunImpl() { 39 bool ExtensionSetUpdateUrlDataFunction::RunSync() {
40 std::string data; 40 std::string data;
41 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &data)); 41 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &data));
42 42
43 const Extension* extension = GetExtension(); 43 const Extension* extension = GetExtension();
44 44
45 if (ManifestURL::UpdatesFromGallery(extension)) { 45 if (ManifestURL::UpdatesFromGallery(extension)) {
46 return false; 46 return false;
47 } 47 }
48 48
49 ExtensionPrefs::Get(GetProfile())->UpdateExtensionPref( 49 ExtensionPrefs::Get(GetProfile())->UpdateExtensionPref(
50 extension_id(), extension::kUpdateURLData, new base::StringValue(data)); 50 extension_id(), extension::kUpdateURLData, new base::StringValue(data));
51 return true; 51 return true;
52 } 52 }
53 53
54 bool ExtensionIsAllowedIncognitoAccessFunction::RunImpl() { 54 bool ExtensionIsAllowedIncognitoAccessFunction::RunSync() {
55 SetResult(new base::FundamentalValue( 55 SetResult(new base::FundamentalValue(
56 util::IsIncognitoEnabled(extension_id(), GetProfile()))); 56 util::IsIncognitoEnabled(extension_id(), GetProfile())));
57 return true; 57 return true;
58 } 58 }
59 59
60 bool ExtensionIsAllowedFileSchemeAccessFunction::RunImpl() { 60 bool ExtensionIsAllowedFileSchemeAccessFunction::RunSync() {
61 SetResult(new base::FundamentalValue( 61 SetResult(new base::FundamentalValue(
62 util::AllowFileAccess(extension_id(), GetProfile()))); 62 util::AllowFileAccess(extension_id(), GetProfile())));
63 return true; 63 return true;
64 } 64 }
65 65
66 } // namespace extensions 66 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698