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

Side by Side Diff: chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc

Issue 8568039: Revert 110235 - chrome: Remove 14 exit time destructors and 2 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/printing/cloud_print/cloud_print_setup_flow.h" 5 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 19 matching lines...) Expand all
30 #include "content/browser/renderer_host/render_view_host.h" 30 #include "content/browser/renderer_host/render_view_host.h"
31 #include "content/browser/tab_contents/tab_contents.h" 31 #include "content/browser/tab_contents/tab_contents.h"
32 #include "content/public/browser/browser_thread.h" 32 #include "content/public/browser/browser_thread.h"
33 #include "grit/chromium_strings.h" 33 #include "grit/chromium_strings.h"
34 #include "grit/locale_settings.h" 34 #include "grit/locale_settings.h"
35 #include "ui/base/l10n/l10n_font_util.h" 35 #include "ui/base/l10n/l10n_font_util.h"
36 #include "ui/gfx/font.h" 36 #include "ui/gfx/font.h"
37 37
38 namespace { 38 namespace {
39 39
40 string16 SetupIframeXPath() { 40 string16& SetupIframeXPath() {
41 return ASCIIToUTF16("//iframe[@id='cloudprintsetup']"); 41 static string16 kSetupIframeXPath =
42 ASCIIToUTF16("//iframe[@id='cloudprintsetup']");
43 return kSetupIframeXPath;
42 } 44 }
43 45
44 string16 DoneIframeXPath() { 46 string16& DoneIframeXPath() {
45 return ASCIIToUTF16("//iframe[@id='setupdone']"); 47 static string16 kDoneIframeXPath =
48 ASCIIToUTF16("//iframe[@id='setupdone']");
49 return kDoneIframeXPath;
46 } 50 }
47 51
48 } // end namespace 52 } // end namespace
49 53
50 //////////////////////////////////////////////////////////////////////////////// 54 ////////////////////////////////////////////////////////////////////////////////
51 // CloudPrintSetupFlow implementation. 55 // CloudPrintSetupFlow implementation.
52 56
53 // static 57 // static
54 CloudPrintSetupFlow* CloudPrintSetupFlow::OpenDialog( 58 CloudPrintSetupFlow* CloudPrintSetupFlow::OpenDialog(
55 Profile* profile, 59 Profile* profile,
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 } 330 }
327 331
328 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( 332 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame(
329 const string16& iframe_xpath, 333 const string16& iframe_xpath,
330 const string16& js) { 334 const string16& js) {
331 if (web_ui_) { 335 if (web_ui_) {
332 RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host(); 336 RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host();
333 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); 337 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js);
334 } 338 }
335 } 339 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_management_backend_impl.cc ('k') | chrome/browser/search_engines/search_terms_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698