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

Side by Side Diff: chrome/utility/chrome_content_utility_client.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 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 | « chrome/test/base/testing_profile.cc ('k') | 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/utility/chrome_content_utility_client.h" 5 #include "chrome/utility/chrome_content_utility_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 bool ChromeContentUtilityClient::Send(IPC::Message* message) { 96 bool ChromeContentUtilityClient::Send(IPC::Message* message) {
97 return content::UtilityThread::Get()->Send(message); 97 return content::UtilityThread::Get()->Send(message);
98 } 98 }
99 99
100 void ChromeContentUtilityClient::OnUnpackExtension( 100 void ChromeContentUtilityClient::OnUnpackExtension(
101 const FilePath& extension_path, 101 const FilePath& extension_path,
102 const std::string& extension_id, 102 const std::string& extension_id,
103 int location, 103 int location,
104 int creation_flags) { 104 int creation_flags) {
105 CHECK(location > Extension::INVALID); 105 CHECK(location > extensions::Extension::INVALID);
106 CHECK(location < Extension::NUM_LOCATIONS); 106 CHECK(location < extensions::Extension::NUM_LOCATIONS);
107 ExtensionUnpacker unpacker( 107 ExtensionUnpacker unpacker(
108 extension_path, 108 extension_path,
109 extension_id, 109 extension_id,
110 static_cast<Extension::Location>(location), 110 static_cast<extensions::Extension::Location>(location),
111 creation_flags); 111 creation_flags);
112 if (unpacker.Run() && unpacker.DumpImagesToFile() && 112 if (unpacker.Run() && unpacker.DumpImagesToFile() &&
113 unpacker.DumpMessageCatalogsToFile()) { 113 unpacker.DumpMessageCatalogsToFile()) {
114 Send(new ChromeUtilityHostMsg_UnpackExtension_Succeeded( 114 Send(new ChromeUtilityHostMsg_UnpackExtension_Succeeded(
115 *unpacker.parsed_manifest())); 115 *unpacker.parsed_manifest()));
116 } else { 116 } else {
117 Send(new ChromeUtilityHostMsg_UnpackExtension_Failed( 117 Send(new ChromeUtilityHostMsg_UnpackExtension_Failed(
118 unpacker.error_message())); 118 unpacker.error_message()));
119 } 119 }
120 120
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 432
433 void ChromeContentUtilityClient::ImporterCleanup() { 433 void ChromeContentUtilityClient::ImporterCleanup() {
434 importer_->Cancel(); 434 importer_->Cancel();
435 importer_ = NULL; 435 importer_ = NULL;
436 bridge_ = NULL; 436 bridge_ = NULL;
437 import_thread_.reset(); 437 import_thread_.reset();
438 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); 438 content::UtilityThread::Get()->ReleaseProcessIfNeeded();
439 } 439 }
440 440
441 } // namespace chrome 441 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698