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

Side by Side Diff: chrome/browser/extensions/platform_app_launcher.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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/platform_app_launcher.h" 5 #include "chrome/browser/extensions/platform_app_launcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // An instance of this class is created for each launch. The lifetime of these 100 // An instance of this class is created for each launch. The lifetime of these
101 // instances is managed by reference counted pointers. As long as an instance 101 // instances is managed by reference counted pointers. As long as an instance
102 // has outstanding tasks on a message queue it will be retained; once all 102 // has outstanding tasks on a message queue it will be retained; once all
103 // outstanding tasks are completed it will be deleted. 103 // outstanding tasks are completed it will be deleted.
104 class PlatformAppPathLauncher 104 class PlatformAppPathLauncher
105 : public base::RefCountedThreadSafe<PlatformAppPathLauncher> { 105 : public base::RefCountedThreadSafe<PlatformAppPathLauncher> {
106 public: 106 public:
107 PlatformAppPathLauncher(Profile* profile, 107 PlatformAppPathLauncher(Profile* profile,
108 const Extension* extension, 108 const Extension* extension,
109 const base::FilePath& file_path) 109 const base::FilePath& file_path)
110 : profile_(profile), 110 : profile_(profile), extension_(extension), file_path_(file_path) {}
111 extension_(extension),
112 file_path_(file_path),
113 handler_id_("") {}
114 111
115 void Launch() { 112 void Launch() {
116 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 113 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
117 if (file_path_.empty()) { 114 if (file_path_.empty()) {
118 LaunchPlatformAppWithNoData(profile_, extension_); 115 LaunchPlatformAppWithNoData(profile_, extension_);
119 return; 116 return;
120 } 117 }
121 118
122 DCHECK(file_path_.IsAbsolute()); 119 DCHECK(file_path_.IsAbsolute());
123 120
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 void RestartPlatformAppWithFileEntries( 417 void RestartPlatformAppWithFileEntries(
421 Profile* profile, 418 Profile* profile,
422 const Extension* extension, 419 const Extension* extension,
423 const std::vector<SavedFileEntry>& file_entries) { 420 const std::vector<SavedFileEntry>& file_entries) {
424 scoped_refptr<SavedFileEntryLauncher> launcher = new SavedFileEntryLauncher( 421 scoped_refptr<SavedFileEntryLauncher> launcher = new SavedFileEntryLauncher(
425 profile, extension, file_entries); 422 profile, extension, file_entries);
426 launcher->Launch(); 423 launcher->Launch();
427 } 424 }
428 425
429 } // namespace extensions 426 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698