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

Side by Side Diff: extensions/browser/api/app_window/app_window_api.cc

Issue 1227413007: Move ReplaceStringPlaceholders to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@join
Patch Set: Created 5 years, 5 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 (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 "extensions/browser/api/app_window/app_window_api.h" 5 #include "extensions/browser/api/app_window/app_window_api.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // If the same property is specified for the inner and outer bounds, raise an 80 // If the same property is specified for the inner and outer bounds, raise an
81 // error. 81 // error.
82 bool CheckBoundsConflict(const scoped_ptr<int>& inner_property, 82 bool CheckBoundsConflict(const scoped_ptr<int>& inner_property,
83 const scoped_ptr<int>& outer_property, 83 const scoped_ptr<int>& outer_property,
84 const std::string& property_name, 84 const std::string& property_name,
85 std::string* error) { 85 std::string* error) {
86 if (inner_property.get() && outer_property.get()) { 86 if (inner_property.get() && outer_property.get()) {
87 std::vector<std::string> subst; 87 std::vector<std::string> subst;
88 subst.push_back(property_name); 88 subst.push_back(property_name);
89 *error = ReplaceStringPlaceholders( 89 *error = base::ReplaceStringPlaceholders(
90 app_window_constants::kConflictingBoundsOptions, subst, NULL); 90 app_window_constants::kConflictingBoundsOptions, subst, NULL);
91 return false; 91 return false;
92 } 92 }
93 93
94 return true; 94 return true;
95 } 95 }
96 96
97 // Copy over the bounds specification properties from the API to the 97 // Copy over the bounds specification properties from the API to the
98 // AppWindow::CreateParams. 98 // AppWindow::CreateParams.
99 void CopyBoundsSpec(const app_window::BoundsSpecification* input_spec, 99 void CopyBoundsSpec(const app_window::BoundsSpecification* input_spec,
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 548
549 if (options.frame->as_frame_options->inactive_color.get()) { 549 if (options.frame->as_frame_options->inactive_color.get()) {
550 error_ = app_window_constants::kInactiveColorWithoutColor; 550 error_ = app_window_constants::kInactiveColorWithoutColor;
551 return false; 551 return false;
552 } 552 }
553 553
554 return true; 554 return true;
555 } 555 }
556 556
557 } // namespace extensions 557 } // namespace extensions
OLDNEW
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | extensions/browser/api/bluetooth/bluetooth_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698